← Back to team overview

yahoo-eng-team team mailing list archive

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

 

Hello Max:

If any of the subnets of a network have DHCP capabilities, the metadata
port of this network namespace will have no IP assigned (exactly the OVN
metadata code you are pointing [1]). That means we can't provide the
metadata via the metadata IP. You need to use a config-drive in this
case [2].

Regards.

[1]https://github.com/openstack/neutron/blob/09207ba731bfc859c2f6d175588a8bfe09be01db/neutron/agent/ovn/metadata/agent.py#L431-L437
[2]https://docs.openstack.org/nova/latest/admin/config-drive.html


** Changed in: neutron
       Status: Confirmed => Invalid

-- 
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:
  Invalid

Bug description:
  Can be related to #1918914

  Openstack version: Ussuri

  I have a very simple deployment with a single flat provider network
  (not sure it matters) with a subnet with DHCP turned off (instances
  are created only with this network).

  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
  ---

  When DHCP is enabled neutron:cidrs gets not empty and metadata is
  properly provisioned.

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



References