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\" ");
print "+++++++++++++++++ OVSDB-SERVER IS NOW LISTENING ON PORT 6640 \n ";
system("ovs-vsctl --db=tcp:10.107.63.133:6640 show");
Results
1 )Sometimes i get this
5d180048-8f91-44ac-93d4-dd9a6a99710b
Bridge "br0"
Controller "tcp:10.107.48.192:6653"
Port "br0"
Interface "br0"
type: internal
Port "eth0"
Interface "eth0"
Port "eth1"
Interface "eth1"
2) Sometimes its failed to start (unable to kill pid or ovsdb-server
immediately catches another pid)
2016-06-09T18:56:53Z|00001|lockfile|WARN|/etc/openvswitch/.conf.db.~lock~:
cannot lock file because it is already locked by pid 1879
ovsdb-server: I/O error: /etc/openvswitch/conf.db: failed to lock lockfile
(Resource temporarily unavailable)
+++++++++++++++++ OVSDB-SERVER IS NOW LISTENING ON PORT 6640
2016-06-25T10:19:04Z|00002|reconnect|WARN|ssl:10.107.63.133:6640:
connection attempt failed (Connection refused)
ovs-vsctl: ssl:10.107.63.133:6640: database connection failed ()
bisically i am using command kill -9 pid_of_ovsdbserver in script.
thank you
rohan
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss