← Back to team overview

yahoo-eng-team team mailing list archive

[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 <steven.blatzheim@xxxxxxxxxxxxxxxxxxxx>
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



References