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. _______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss