← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1976366] [NEW] OVN: Metadata is not provisioned for a network with DHCP turned off

 

Public bug reported:

Can be related to #1918914

I have a flat provider network with a subnet with DHCP turned off.
In this case neutron-ovn-metadata-agent does not provision metadata service for this network:

---
root@eq-os1:~# ovn-sbctl find Port_Binding type=localport
_uuid               : b6329cbe-e80f-48a3-921d-e1031afd85d8
chassis             : []
datapath            : 097732e0-85d1-4744-a9c6-bafa0d861700
encap               : []
external_ids        : {"neutron:cidrs"="", "neutron:device_id"=ovnmeta-81954d74-51e6-4598-b6b6-3da3832f20df, "neutron:device_owner"="network:dhcp", "neutron:network_name"=neutron-81954d74-51e6-4598-b6b6-3da3832f20df, "neutron:port_name"="", "neutron:project_id"=f11221fbfbb844209cd49c7ca3a12a00, "neutron:revision_number"="1", "neutron:security_group_ids"=""}
gateway_chassis     : []
ha_chassis_group    : []
logical_port        : "a557f47a-dae7-4150-96c2-71abbf48b84b"
mac                 : ["fa:16:3e:06:ed:9b"]
nat_addresses       : []
options             : {requested-chassis=""}
parent_port         : []
tag                 : []
tunnel_key          : 2
type                : localport
virtual_parent      : []
root@eq-os1:~# 
---

The reason is that external_ids:neutron:cidrs is empty so
provision_datapath() ignores this network in this case:

--- neutron/agent/ovn/metadata/agent.py ---
        # If there's no metadata port or it doesn't have a MAC or IP
        # addresses, then tear the namespace down if needed. This might happen
        # when there are no subnets yet created so metadata port doesn't have
        # an IP address.
        if not (port and port.mac and
                port.external_ids.get(ovn_const.OVN_CIDRS_EXT_ID_KEY, None)):
            LOG.debug("There is no metadata port for network %s or it has no "
                      "MAC or IP addresses configured, tearing the namespace "
                      "down if needed", net_name)
            self.teardown_datapath(datapath, net_name)
            return
---

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1976366

Title:
  OVN: Metadata is not provisioned for a network with DHCP turned off

Status in neutron:
  New

Bug description:
  Can be related to #1918914

  I have a flat provider network with a subnet with DHCP turned off.
  In this case neutron-ovn-metadata-agent does not provision metadata service for this network:

  ---
  root@eq-os1:~# ovn-sbctl find Port_Binding type=localport
  _uuid               : b6329cbe-e80f-48a3-921d-e1031afd85d8
  chassis             : []
  datapath            : 097732e0-85d1-4744-a9c6-bafa0d861700
  encap               : []
  external_ids        : {"neutron:cidrs"="", "neutron:device_id"=ovnmeta-81954d74-51e6-4598-b6b6-3da3832f20df, "neutron:device_owner"="network:dhcp", "neutron:network_name"=neutron-81954d74-51e6-4598-b6b6-3da3832f20df, "neutron:port_name"="", "neutron:project_id"=f11221fbfbb844209cd49c7ca3a12a00, "neutron:revision_number"="1", "neutron:security_group_ids"=""}
  gateway_chassis     : []
  ha_chassis_group    : []
  logical_port        : "a557f47a-dae7-4150-96c2-71abbf48b84b"
  mac                 : ["fa:16:3e:06:ed:9b"]
  nat_addresses       : []
  options             : {requested-chassis=""}
  parent_port         : []
  tag                 : []
  tunnel_key          : 2
  type                : localport
  virtual_parent      : []
  root@eq-os1:~# 
  ---

  The reason is that external_ids:neutron:cidrs is empty so
  provision_datapath() ignores this network in this case:

  --- neutron/agent/ovn/metadata/agent.py ---
          # If there's no metadata port or it doesn't have a MAC or IP
          # addresses, then tear the namespace down if needed. This might happen
          # when there are no subnets yet created so metadata port doesn't have
          # an IP address.
          if not (port and port.mac and
                  port.external_ids.get(ovn_const.OVN_CIDRS_EXT_ID_KEY, None)):
              LOG.debug("There is no metadata port for network %s or it has no "
                        "MAC or IP addresses configured, tearing the namespace "
                        "down if needed", net_name)
              self.teardown_datapath(datapath, net_name)
              return
  ---

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1976366/+subscriptions



Follow ups