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>
Tue, 18 Jun 2013 22:32:54 +0000 (15:32 -0700)
commit83d75d32c56896053034b81d23de3548e554ca9f
treeaef718629d765fc9c9344fa6e2bfdf671b702a17
parent6cbbf4fa07f12f7f3977a1b3b63783220f4db3ea
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