[openstack-dev] [Neutron] _notify_port_updated in ML2 plugin doesn't take effect under some conditions
Li Ma
mali at awcloud.com
Mon Mar 17 08:11:49 UTC 2014
Hi stackers,
I'm trying to extend the capability of port by propagating
binding:profile from neutron-server to l2-agents.
When I issue update-port-api with a new binding:profile, I find that the
action is not notified to any agents. Then I check the code and find the
following function:
def _notify_port_updated(self, mech_context):
port = mech_context._port
segment = mech_context.bound_segment
if not segment:
# REVISIT(rkukura): This should notify agent to unplug port
network = mech_context.network.current
LOG.warning(_("In _notify_port_updated(), no bound segment for "
"port %(port_id)s on network %(network_id)s"),
{'port_id': port['id'],
'network_id': network['id']})
return
self.notifier.port_update(mech_context._plugin_context, port,
segment[api.NETWORK_TYPE],
segment[api.SEGMENTATION_ID],
segment[api.PHYSICAL_NETWORK])
I'm not sure why it checks bound segment here to prevent sending
port_update out?
In my situation, I run a devstack environment and the bound segment is
None by default. Actually, I need this message to be sent out in any
situations.
I'd appreciate any hints.
Thanks a lot,
--
---
cheers,
Li Ma
More information about the OpenStack-dev
mailing list