On Fri, Mar 15, 2013 at 02:46:05PM -0700, Ansis Atteka wrote:
> On Fri, Mar 15, 2013 at 1:37 PM, Ben Pfaff <b...@nicira.com> wrote:
> > Until now, ovs-vsctl has kept trying to the database server until it
> > succeeded or the timeout expired (if one was specified with --timeout).
> > This meant that if ovsdb-server wasn't running, then ovs-vsctl would hang.
> > The result was that almost every ovs-vsctl invocation in scripts specified
> > a timeout on the off-chance that the database server might not be running.
> > But it's difficult to choose a good timeout.  A timeout that is too short
> > can cause spurious failures.  A timeout that is too long causes long delays
> > if the server really isn't running.

...

> > +        causing it to hang if ovsdb-server was not running.  Now, ovs-vsctl
> > +        only tries once by default (use --retry to try forever).  This 
> > change
> > +        means that you may want to remove uses of --timeout to avoid hangs
> > +        in ovs-vsctl calls.g
> It seems that "g" is not necessary here.

Oops.  I removed it.

> > +++ b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py
> > @@ -1,4 +1,4 @@
> > -# Copyright (c) 2007-2011, 2013 Citrix Systems Inc.
> > +# Copyright (c) 2007-2011, 2013 Citrix Systems Inc.
> >  # Copyright (c) 2009,2010,2011,2012 Nicira, Inc.
> Not sure, but did not you have to increase year for Nicira, Inc. line?

Oops.  Fixed.

> >  #
> >  # This program is free software; you can redistribute it and/or modify
> > @@ -86,7 +86,7 @@ class VSwitchConfig:
> >      @staticmethod
> >      def Get(action):
> >          try:
> > -            arg = [vsctl, "--timeout=30", "-vconsole:off"] + action.split()
> > +            arg = [vsctl, "-vconsole:off"] + action.split()
> >              output = ShellPipe(arg).Stdout()
> >          except StandardError, e:
> >              XSLogError("config retrieval error: " + str(e))
> > --
> 
> 
> Perhaps I missed it, but did you add explanation for "--retry" flag to
> usage()? I see documentation only in ovs-vsctl man page.

You're right, I forgot.

I've added this line to usage() in ovs-vsctl.c after the --no-wait
line:

  --retry                     keep trying to connect to server forever\n\


> I will try to apply this patch locally and test it out. It will take
> another 30 minutes.

Thanks.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to