[ovs-dev] [PATCH] ovsdb-tool: Don't wait for lockfiles on "compact" or "convert".

Jesse Gross jesse at nicira.com
Mon Jun 14 22:18:47 UTC 2010


On Wed, Jun 9, 2010 at 11:24 AM, Ben Pfaff <blp at nicira.com> wrote:

> Until now, "ovsdb-tool convert" and "ovsdb-tool compact" were willing to
> wait an arbitrarily long time to get a lock on the database or on a
> temporary file.  In practice, though, the program most likely to have the
> lock is ovsdb-server, which is not a transient process, and thus
> ovsdb-tool will likely wait indefinitely if it waits at all.
>
> This commit changes these ovsdb-tool commands so that they won't wait at
> all if some other program has the lock.  (The other commands already had
> this behavior.)
>
> As a side effect, this change fixes the behavior of
> "/etc/init.d/openvswitch start" when Open vSwitch was already running.
> Previously, it would hang waiting for "ovsdb-tool convert" to finish.
> Now, it completes quickly with an error.
>
> CC: Reid Price <reid at nicira.com>
> Bug #2864.
>

 I wonder if it might be better to have a short period to wait rather than
none at all.  That would still avoid a deadlock when ovsdb-server is running
while avoiding errors that might seem somewhat random if there is another
transient process.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20100614/bdab97de/attachment-0003.html>


More information about the dev mailing list