Reviewed:  https://review.opendev.org/c/openstack/neutron/+/944327
Committed: 
https://opendev.org/openstack/neutron/commit/98b006b7e061752ae0cd3148d9308e2070240c11
Submitter: "Zuul (22348)"
Branch:    master

commit 98b006b7e061752ae0cd3148d9308e2070240c11
Author: Rodolfo Alonso Hernandez <ralon...@redhat.com>
Date:   Fri Mar 14 02:14:41 2025 +0000

    Fast exit if "segments" plugin is not loaded
    
    The method ``auto_schedule_new_network_segments`` will be called when a
    new agent is created and the segment host mapping is updated. If the
    "segments" plugin is not loaded, the method
    ``auto_schedule_new_network_segments`` should fast exit.
    
    Closes-Bug: #2102609
    Change-Id: I46d58e1f7f9f6b0fdb70f2298839ee5423722e11


** Changed in: neutron
       Status: In Progress => 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/2102609

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

Status in neutron:
  Fix Released

Bug description:
  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
  """

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

  Jira reference: https://issues.redhat.com/browse/OSPRH-14753

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


-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to