ovs-xapi-sync: Cache the bridge-id value for non nicira-bridge-id too.
authorGurucharan Shetty <gshetty@nicira.com>
Sun, 16 Jun 2013 12:09:20 +0000 (05:09 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Wed, 19 Jun 2013 15:40:40 +0000 (08:40 -0700)
commit2ac6b92d788928056bd5ba297dcf856b9bdc99aa
treefd68e8d6c38dba6e19be2b11e3e3cf2db706e9d5
parent1475bc3ed831c5b85f19595629156450be1da947
ovs-xapi-sync: Cache the bridge-id value for non nicira-bridge-id too.

Currently we connect to xapi in case there are multiple
external_ids:xs-network-uuids to get the single bridge id everytime
we have a change in the database for all the interested columns in
ovs-xapi-sync. The xs-network-uuids value can also change whenever
new VLANs are added or deleted, which is a common use case. The
disadvantage with this approach is that we query XAPI more often
and set the bridge-id as "" if we don't get a valid response for
our query. This can take down the logical connectivity for all the
VMs on that xenserver.

Instead of looking at the PIF records for all the xs-network-uuids,
we can instead just look at the xapi record which has the same bridge
name as the OVS bridge name and then cache its uuid. This value will
hold true till the OVS bridge is recreated in which case we will re-read
the value.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync