Ask Your Question

How does neutron ml2 plugin specify the agent to which it want to notify port update?

asked 2015-05-06 20:00:01 -0500

creasyboy2002 gravatar image

When neutron ml2 plugin notify portupdate to openvswitch agent,how does it specify the agent.I mean on which compute node the openvswitch runs? I thougnt a port update is related to a vm,and a vm run on a compute node.but I did not find the parameter of the rpc to specify the compute node.

def port_update(self, context, port, network_type, segmentation_id,
    cctxt = self.client.prepare(topic=self.topic_port_update,
    cctxt.cast(context, 'port_update', port=port,
               network_type=network_type, segmentation_id=segmentation_id,
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-05-07 13:45:17 -0500

darragh-oreilly gravatar image

This is a cast, which means all agents that listen on this topic will get it. The agents ignore the update if they do not have a local device that corresponds to the port id.

edit flag offensive delete link more


Thank you very much,I just found the code which does the job:updated_ports &= cur_ports. Nova use external-ids to transfer this para through openvswitch.

creasyboy2002 gravatar imagecreasyboy2002 ( 2015-05-07 20:40:32 -0500 )edit

exactly, with the ovs agent, the port_update rpc call just puts the port id in a set named updated_ports. Then later, in the main daemon loop green thread, loop, ids that don't exist on the system are removed from the set.

darragh-oreilly gravatar imagedarragh-oreilly ( 2015-05-08 01:14:03 -0500 )edit

answered 2015-05-07 08:41:58 -0500

dbaxps gravatar image

updated 2015-05-07 09:13:28 -0500

Not sure it exactly addresses question, view
View also regarding l2population need in ARP resolution

  When using the ML2 plugin with tunnels and a new port goes up, ML2 sends a update_port_postcommit notification which is picked up and processed by the l2pop mechanism driver. l2 pop then gathers the IP and MAC of the port, as well as the host that the port was scheduled on; It then sends an RPC notification to all layer 2 agents.

Network Node

[root@juno1 ~(keystone_admin)]# cat /etc/neutron/plugins/ml2/ml2_conf.ini
type_drivers = vxlan
tenant_network_types = vxlan
mechanism_drivers =openvswitch,l2population
vni_ranges = 65537:69999
vxlan_group =
enable_security_group = True

Compute Node

[root@juno2 openvswitch]# cat ovs_neutron_plugin.ini
enable_tunneling = True
integration_bridge = br-int
tunnel_bridge = br-tun
local_ip =
bridge_mappings =physnet1:br-ex
polling_interval = 2
tunnel_types =vxlan
vxlan_udp_port =4789
l2_population = True
arp_responder = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
edit flag offensive delete link more


The answer is not for my question,but thank you all the same.

creasyboy2002 gravatar imagecreasyboy2002 ( 2015-05-07 20:37:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2015-05-06 20:00:01 -0500

Seen: 194 times

Last updated: May 07 '15