]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix linuxbridge RPC message format
authorBob Kukura <rkukura@redhat.com>
Tue, 14 May 2013 21:35:08 +0000 (17:35 -0400)
committerBob Kukura <rkukura@redhat.com>
Thu, 16 May 2013 02:06:00 +0000 (22:06 -0400)
commit56cac98626f1b25fd375b9c8d00294d6fb84496b
tree4d21893ffc857973d2ddfb73678745e5f1424e25
parent129a473e52f5f179749df43b3c8f29b4bc2d9f1a
Fix linuxbridge RPC message format

The linuxbridge, openvswitch, and hyperv plugins all use the same
basic RPC interface between their plugins and L2 agents. But the
attributes describing a virtual network passed from the plugin to the
agent over this interface differed for historical reasons. The
openvswitch and hyperv plugins each pass network_type,
physical_network, and segmentation_id attributes, whereas the
linuxbridge plugin previously passed vlan_id and physical_network
attributes, using special vlan_id values to indicate flat or local
network types.

This patch changes the linuxbridge plugin to pass network_type and
segmentation_id attributes instead of the vlan_id attribute, bringing
its message formats into sync with the other plugins. RPC
compatibility is required for blueprint modular-l2 so that the ml2
plugin can work with all three existing types of L2 agent. This RPC
message format change is also required for blueprint
vxlan-linuxbridge.

Unlike the vxlan-linuxbridge patch on which it is based (see
https://review.openstack.org/#/c/26516/), this patch does not bump the
linuxbridge RPC version number, as the ml2 plugin will require all
three L2 agents to use the same RPC version. Instead, the updated
linuxbridge agent maintains compatibility with old linuxbridge plugins
by accepting either the old or new attributes. There is also a
configuration option, currently turned on by default, to enable the
updated linuxbridge plugin to pass the vlan_id attribute expected by
old linuxbridge agents along with the new attributes. These message
format compatibility mechanisms are intended to aid during upgrades,
and can eventually be removed.

Change-Id: I7cc1c9f96b09db6bab2c7d9f2b30b79fa4dab919
etc/quantum/plugins/linuxbridge/linuxbridge_conf.ini
quantum/plugins/linuxbridge/agent/linuxbridge_quantum_agent.py
quantum/plugins/linuxbridge/common/config.py
quantum/plugins/linuxbridge/common/constants.py
quantum/plugins/linuxbridge/lb_quantum_plugin.py
quantum/tests/unit/linuxbridge/test_defaults.py
quantum/tests/unit/linuxbridge/test_lb_quantum_agent.py
quantum/tests/unit/linuxbridge/test_rpcapi.py