[aim] Send port after_update events immediately

As of the newton release, these events seem to be redundant
since they are being sent right before a network delete. Queueing them
up leads to an stacktrace in the logs since the network cannot be
found when are they are processed for sending.

Change-Id: Ib7d912b4dfd0faf97bd25bd62c64c6ea2be4df98
This commit is contained in:
Sumit Naiksatam 2017-05-18 08:46:22 -07:00
parent 2ffa0ee9db
commit 7068970e26

View File

@ -152,13 +152,13 @@ def send_or_queue_registry_notification(
send, queue = False, False
callbacks = _get_callbacks_for_resource_event(resource, event)
if resource in ['port', 'router_interface', 'subnet'] and (
event in ['after_delete', 'precommit_delete']):
event in ['after_update', 'after_delete', 'precommit_delete']):
# We make an exception for the dhcp agent notification
# for port and subnet delete since the implementation for
# for port and subnet since the implementation for
# sending that notification checks for the existence of the
# associated network, which is not present in certain
# cases if the subnet delete notification is queued
# and sent after the network delete.
# cases if the notification is queued and sent after the network
# delete.
# All notifiers (in-process as well as agent) will be
# invoked in this case, no queueing of the notification
# is required.