[Yahoo-eng-team] [Bug 2055245] Re: DHCP Option is not passed to VM via Cloud-init
Reviewed: https://review.opendev.org/c/openstack/nova/+/910466 Committed: https://opendev.org/openstack/nova/commit/135af5230e6f30fe158a25f7888e52cf886a7a35 Submitter: "Zuul (22348)" Branch:master commit 135af5230e6f30fe158a25f7888e52cf886a7a35 Author: Steven Blatzheim Date: Wed Feb 28 07:25:59 2024 +0100 Fix nova-metadata-api for ovn dhcp native networks With the change from ml2/ovs DHCP agents towards OVN implementation in neutron there is no port with device_owner network:dhcp anymore. Instead DHCP is provided by network:distributed port. Closes-Bug: 2055245 Change-Id: Ibb569b9db1475b8bbd8f8722d49228182cd47f85 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/2055245 Title: DHCP Option is not passed to VM via Cloud-init Status in neutron: Invalid Status in OpenStack Compute (nova): Fix Released Bug description: Description === Nova-Metadata-API doesn't provide ipv4_dhcp type for OVN (native OVH DHCP feature, no DHCP agents) networks with dhcp_enabled but no default gateway. Problem seems to be in https://opendev.org/openstack/nova/src/branch/master/nova/network/neutron.py#L3617 There is just an exception to networks without device_owner: network:dhcp where default gateway is used, which doesn't cover this case. Steps to reproduce == Create a OVN network in an environment where native DHCP feature is provided by ovn (no ml2/ovs DHCP Agents). In addition this network needs to have no default gateway enabled. Create VM in this network and observe the cloud-init process (network_data.json) Expected result === network_data.json (http://169.254.169.254/openstack/2018-08-27/network_data.json) should return something like: { "links": [ { "id": "tapddc91085-96", "vif_id": "ddc91085-9650-4b7b-ad9d-b475bac8ec8b", "type": "ovs", "mtu": 1442, "ethernet_mac_address": "fa:16:3e:93:49:fa" } ], "networks": [ { "id": "network0", "type": "ipv4_dhcp", "link": "tapddc91085-96", "network_id": "9f61a3a7-26d3-4013-b61d-12880b325ea9" } ], "services": [] } Actual result = { "links": [ { "id": "tapddc91085-96", "vif_id": "ddc91085-9650-4b7b-ad9d-b475bac8ec8b", "type": "ovs", "mtu": 1442, "ethernet_mac_address": "fa:16:3e:93:49:fa" } ], "networks": [ { "id": "network0", "type": "ipv4", "link": "tapddc91085-96", "ip_address": "10.0.0.40", "netmask": "255.255.255.0", "routes": [], "network_id": "9f61a3a7-26d3-4013-b61d-12880b325ea9", "services": [] } ], "services": [] } Environment === Openstack Zed with Neutron OVN feature enabled Nova: 26.2.1 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/2055245/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 2055245] Re: DHCP Option is not passed to VM via Cloud-init
Neutron started using network:distributed for both DHCP and metadata ports in Victoria [0] Looking at the change proposed, Nova only ever looks for ports with network:dhcp in the device_owner field, it also needs to do a lookup of ports with network:distributed in this field. Unfortunately they can't be combined in one query at the moment, I might try to fix that. So I don't think this a valid bug for Neutron. [0] https://review.opendev.org/c/openstack/neutron/+/732364 ** Changed in: neutron Status: New => Invalid -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/2055245 Title: DHCP Option is not passed to VM via Cloud-init Status in neutron: Invalid Status in OpenStack Compute (nova): In Progress Bug description: Description === Nova-Metadata-API doesn't provide ipv4_dhcp type for OVN (native OVH DHCP feature, no DHCP agents) networks with dhcp_enabled but no default gateway. Problem seems to be in https://opendev.org/openstack/nova/src/branch/master/nova/network/neutron.py#L3617 There is just an exception to networks without device_owner: network:dhcp where default gateway is used, which doesn't cover this case. Steps to reproduce == Create a OVN network in an environment where native DHCP feature is provided by ovn (no ml2/ovs DHCP Agents). In addition this network needs to have no default gateway enabled. Create VM in this network and observe the cloud-init process (network_data.json) Expected result === network_data.json (http://169.254.169.254/openstack/2018-08-27/network_data.json) should return something like: { "links": [ { "id": "tapddc91085-96", "vif_id": "ddc91085-9650-4b7b-ad9d-b475bac8ec8b", "type": "ovs", "mtu": 1442, "ethernet_mac_address": "fa:16:3e:93:49:fa" } ], "networks": [ { "id": "network0", "type": "ipv4_dhcp", "link": "tapddc91085-96", "network_id": "9f61a3a7-26d3-4013-b61d-12880b325ea9" } ], "services": [] } Actual result = { "links": [ { "id": "tapddc91085-96", "vif_id": "ddc91085-9650-4b7b-ad9d-b475bac8ec8b", "type": "ovs", "mtu": 1442, "ethernet_mac_address": "fa:16:3e:93:49:fa" } ], "networks": [ { "id": "network0", "type": "ipv4", "link": "tapddc91085-96", "ip_address": "10.0.0.40", "netmask": "255.255.255.0", "routes": [], "network_id": "9f61a3a7-26d3-4013-b61d-12880b325ea9", "services": [] } ], "services": [] } Environment === Openstack Zed with Neutron OVN feature enabled Nova: 26.2.1 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/2055245/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 2055245] Re: DHCP Option is not passed to VM via Cloud-init
** Changed in: nova Status: Invalid => In Progress -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/2055245 Title: DHCP Option is not passed to VM via Cloud-init Status in neutron: New Status in OpenStack Compute (nova): In Progress Bug description: Description === Nova-Metadata-API doesn't provide ipv4_dhcp type for OVN (native OVH DHCP feature, no DHCP agents) networks with dhcp_enabled but no default gateway. Problem seems to be in https://opendev.org/openstack/nova/src/branch/master/nova/network/neutron.py#L3617 There is just an exception to networks without device_owner: network:dhcp where default gateway is used, which doesn't cover this case. Steps to reproduce == Create a OVN network in an environment where native DHCP feature is provided by ovn (no ml2/ovs DHCP Agents). In addition this network needs to have no default gateway enabled. Create VM in this network and observe the cloud-init process (network_data.json) Expected result === network_data.json (http://169.254.169.254/openstack/2018-08-27/network_data.json) should return something like: { "links": [ { "id": "tapddc91085-96", "vif_id": "ddc91085-9650-4b7b-ad9d-b475bac8ec8b", "type": "ovs", "mtu": 1442, "ethernet_mac_address": "fa:16:3e:93:49:fa" } ], "networks": [ { "id": "network0", "type": "ipv4_dhcp", "link": "tapddc91085-96", "network_id": "9f61a3a7-26d3-4013-b61d-12880b325ea9" } ], "services": [] } Actual result = { "links": [ { "id": "tapddc91085-96", "vif_id": "ddc91085-9650-4b7b-ad9d-b475bac8ec8b", "type": "ovs", "mtu": 1442, "ethernet_mac_address": "fa:16:3e:93:49:fa" } ], "networks": [ { "id": "network0", "type": "ipv4", "link": "tapddc91085-96", "ip_address": "10.0.0.40", "netmask": "255.255.255.0", "routes": [], "network_id": "9f61a3a7-26d3-4013-b61d-12880b325ea9", "services": [] } ], "services": [] } Environment === Openstack Zed with Neutron OVN feature enabled Nova: 26.2.1 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/2055245/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 2055245] Re: DHCP Option is not passed to VM via Cloud-init
this is a neutron bug not a nova one. the behavior should not change between using the dhcp aganet and native dhcp ** Also affects: neutron Importance: Undecided Status: New ** Changed in: nova Status: In Progress => Invalid -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/2055245 Title: DHCP Option is not passed to VM via Cloud-init Status in neutron: New Status in OpenStack Compute (nova): Invalid Bug description: Description === Nova-Metadata-API doesn't provide ipv4_dhcp type for OVN (native OVH DHCP feature, no DHCP agents) networks with dhcp_enabled but no default gateway. Problem seems to be in https://opendev.org/openstack/nova/src/branch/master/nova/network/neutron.py#L3617 There is just an exception to networks without device_owner: network:dhcp where default gateway is used, which doesn't cover this case. Steps to reproduce == Create a OVN network in an environment where native DHCP feature is provided by ovn (no ml2/ovs DHCP Agents). In addition this network needs to have no default gateway enabled. Create VM in this network and observe the cloud-init process (network_data.json) Expected result === network_data.json (http://169.254.169.254/openstack/2018-08-27/network_data.json) should return something like: { "links": [ { "id": "tapddc91085-96", "vif_id": "ddc91085-9650-4b7b-ad9d-b475bac8ec8b", "type": "ovs", "mtu": 1442, "ethernet_mac_address": "fa:16:3e:93:49:fa" } ], "networks": [ { "id": "network0", "type": "ipv4_dhcp", "link": "tapddc91085-96", "network_id": "9f61a3a7-26d3-4013-b61d-12880b325ea9" } ], "services": [] } Actual result = { "links": [ { "id": "tapddc91085-96", "vif_id": "ddc91085-9650-4b7b-ad9d-b475bac8ec8b", "type": "ovs", "mtu": 1442, "ethernet_mac_address": "fa:16:3e:93:49:fa" } ], "networks": [ { "id": "network0", "type": "ipv4", "link": "tapddc91085-96", "ip_address": "10.0.0.40", "netmask": "255.255.255.0", "routes": [], "network_id": "9f61a3a7-26d3-4013-b61d-12880b325ea9", "services": [] } ], "services": [] } Environment === Openstack Zed with Neutron OVN feature enabled Nova: 26.2.1 To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/2055245/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp