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:39:41 +0000 (08:39 -0700)
commit9b5e5bb8e48affe55ca58f23f36d569f5ae70354
tree4ad67946138932742d89cfeddef82d930c62e839
parentaa18a19397bd59ac19d62fbb5a84e5c15d227963
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