Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-14753

DHCP scheduler failing when an agent is added and "segments" plugin not loaded

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhos-18.0.0
    • openstack-neutron
    • None
    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • openstack-neutron-22.2.2-18.0.20250317095209.51e19bb.el9osttrunk
    • None
    • Neutron Sprint 10, Neutron Sprint 11, Neutron Sprint 12, Neutron Sprint 13, Neutron Sprint 14, Neutron Sprint 15, Neutron Sprint 16, Neutron Sprint 17
    • 8
    • Moderate

      Since [1], when a new agent is added, the event (SEGMENT_HOST_MAPPING, AFTER_CREATE) is called. That calls the method ``auto_schedule_new_network_segments`` [2]. If the ``segments`` plugin is not loaded, that will raise the following exception: [3]

      """

      ERROR neutron_lib.callbacks.manager [None req-7a8042b5-ec95-432e-a03c-3770628cc424 None None] Error during notification for neutron.plugins.ml2.plugin.DhcpAgentSchedulerDbMixin.auto_schedule_new_network_segments-2354089 segment_host_mapping, after_create: AttributeError: 'NoneType' object has no attribute 'get_segments'

      ERROR neutron_lib.callbacks.manager Traceback (most recent call last):

      ERROR neutron_lib.callbacks.manager File "/opt/stack/neutron-lib/neutron_lib/callbacks/manager.py", line 189, in _notify_loop

      ERROR neutron_lib.callbacks.manager callback.method(resource, event, trigger, payload=payload)

      ERROR neutron_lib.callbacks.manager File "/opt/stack/neutron/neutron/db/agentschedulers_db.py", line 494, in auto_schedule_new_network_segments

      ERROR neutron_lib.callbacks.manager segments = segment_plugin.get_segments(

      ERROR neutron_lib.callbacks.manager AttributeError: 'NoneType' object has no attribute 'get_segments'

      ERROR neutron_lib.callbacks.manager

      """

      How to reproduce:

      • Remove if present the ``segments`` plugin from the Neutron API configuration.
      • Delete any OVN agent using the CLI: $ openstack network agent delete <>. For example, an OVN controller.
      • Check the Neutron API logs.

      [1]https://review.opendev.org/q/I8112076f8acb821752941396e7aa39ecb1352ca3
      [2]https://github.com/openstack/neutron/blob/e47aed1508badcf2f52e0a5ced932abf9ff73655/neutron/db/agentschedulers_db.py#L487-L509
      [3]https://paste.opendev.org/show/bZRtBWdRNT8o8roOSlm1/

              rodolfo_alonso Rodolfo Alonso
              rodolfo_alonso Rodolfo Alonso
              Bharath M V Bharath M V
              rhos-dfg-networking-squad-neutron
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: