[ovs-discuss] database connection failed

Ben Pfaff blp at ovn.org
Sat Jun 25 17:45:55 UTC 2016


On Sat, Jun 25, 2016 at 04:07:57PM +0530, Rohan Kharade wrote:
> I have written script to remotely start ovsdb server instance by killing
> older one . Its gives proper results for some attempts or for some attempts
> i get error like database connection failed.
> 
> Script for initiating ovsdb server
> 
> #!/usr/bin/env perl
> 
> $pid = `ssh root\@"10.107.63.133 " pidof ovsdb-server`;
> system("ssh root\@"10.107.63.133"  kill -9 $pid ");
> 
> system("ssh root\@"10.107.63.133" \"ovsdb-server
> --remote=ptcp:6640::10.107.63.133 --detach\" ");

"kill" doesn't wait for the process to die, so occasionally you're
starting the new process before the old one is gone, so the new
ovsdb-server is trying to lock a file that's still locked by the old
ovsdb-server.

Insert a "sleep" or, better yet, wait until the old process is actually
dead.



More information about the discuss mailing list