← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1946588] Re: [OVN]Metadata get warn logs after boot instance server about "MetadataServiceReadyWaitTimeoutException"

 

** Changed in: neutron
       Status: New => Fix Released

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

Title:
  [OVN]Metadata get warn logs after boot instance server about
  "MetadataServiceReadyWaitTimeoutException"

Status in neutron:
  Fix Released

Bug description:
  The operation:
  1. Create virtual machines in batches
  2. View neutron-server logs

  Warning logs as:
  2021-10-10 19:18:08.384 78 WARNING neutron.plugins.ml2.drivers.ovn.mech_driver.mech_driver [req-18282ec4-8752-4c7b-8cb8-3f54a02377ba - - - - -] Metadata service is not ready for port 5466933e-a22e-4288-b40c-ddc01fe23cfa, check neutron-ovn-metadata-agent status/logs.: neutron.plugins.ml2.drivers.ovn.mech_driver.mech_driver.MetadataServiceReadyWaitTimeoutException

  
  This is due to:
  The value about neutron-metadata-proxy-networks of Chassis's external_ids are network_id, and the datapath field of Port_Binding table is the uuid of Datapath_Binding tables.

  When call function set_port_status_up, it check
  self._wait_for_metadata_provisioned_if_needed(port_id)

  ```
              ...
              try:
                  n_utils.wait_until_true(
                      lambda: datapath in
                      self._sb_ovn.get_chassis_metadata_networks(chassis),
                      timeout=METADATA_READY_WAIT_TIMEOUT,
                      exception=MetadataServiceReadyWaitTimeoutException)
              except MetadataServiceReadyWaitTimeoutException:
                  # If we reach this point it means that metadata agent didn't
                  # provision the datapath for this port on its chassis. Either
                  # the agent is not running or it crashed. We'll complete the
                  # provisioning block though.
                  LOG.warning("Metadata service is not ready for port %s, check"
                              " neutron-ovn-metadata-agent status/logs.",
                              port_id)
              ...
  ```

  Get datapath:
      def get_logical_port_chassis_and_datapath(self, name):
          for port in self._tables['Port_Binding'].rows.values():
              if port.logical_port == name:
                  datapath = str(port.datapath.uuid)
                  chassis = port.chassis[0].name if port.chassis else None
                  return chassis, datapath

  
  Get neutron-metadata-proxy-networks:
      def get_chassis_metadata_networks(self, chassis_name):
          """Return a list with the metadata networks the chassis is hosting."""
          try:
              chassis = self.lookup('Chassis', chassis_name)
          except idlutils.RowNotFound:
              LOG.warning("Couldn't find Chassis named %s in OVN while looking "
                          "for metadata networks", chassis_name)
              return []
          proxy_networks = chassis.external_ids.get(
              'neutron-metadata-proxy-networks', None)
          return proxy_networks.split(',') if proxy_networks else []

  I fix it by this way:
      def get_logical_port_chassis_and_datapath(self, name):
          for port in self._tables['Port_Binding'].rows.values():
              if port.logical_port == name:
                  network_id = utils.get_network_name_from_datapath(
                      port.datapath)
                  chassis = port.chassis[0].name if port.chassis else None
                  return chassis, network_id

  
  Version: stable/wallaby

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



References