[ovs-dev] [PATCH] ovs-xapi-sync: Cache the bridge-id value for non nicira-bridge-id too.

Gurucharan Shetty shettyg at nicira.com
Tue Jun 18 20:30:28 UTC 2013

On Tue, Jun 18, 2013 at 11:05 AM, Ben Pfaff <blp at nicira.com> wrote:

> On Mon, Jun 17, 2013 at 01:25:01AM -0700, Gurucharan Shetty wrote:
> > 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 at nicira.com>
> I think that the tolerance for XAPI failures is incomplete, because we
> call update_fail_mode(), update_in_band_mgmt(), and get_bridge_id()
> only once for a bridge, even if XAPI fails to respond on the first
> attempt.
Yes. We can make some improvements. Do you mind, if I come up with a
separate patch
for this, since the current one talks about caching non nicira-bridge-id.
(get_bridge_id() gets
the nicira-bridge-id)

> I am not sure why the set_external_id() call splits bridge_id on ';'.
> Can bridge_id contain ';' at this point?
The case wherein bridge-id can have ";" is if nicira-bridge-id has a ";".
If you feel, that is not a valid use case, I can get rid of it.

> I am not sure why bridge_id and bridge_id_cache are different
> variables.  When do they have different values?
In case get_single_bridge_id() gets us a "", we don't want to cache it.
Hence 2 separate variables.


> Thanks,
> Ben.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130618/2f1cfb4e/attachment-0003.html>

More information about the dev mailing list