]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Make virsh reconnect when losing connection
authorDaniel Veillard <veillard@redhat.com>
Fri, 5 Mar 2010 09:59:52 +0000 (10:59 +0100)
committerDaniel Veillard <veillard@redhat.com>
Wed, 10 Mar 2010 16:03:07 +0000 (17:03 +0100)
commit056623f3d783055aa2e342db8ad1198d6abe0613
tree2f8cac09e532b5bdaa3bd5b94217939bbf02d608
parent7be9270c246cf3c5f560a1abbbb4905cf5a279b2
Make virsh reconnect when losing connection

When the daemon libvirtd restarts, a connected virsh gets a SIGPIPE
and dies. This change the behaviour to try to reconnect if the
signal was received or command error indicated a connection or RPC
failure. Note that the failing command is not restarted.

* tools/virsh.c: catch SIGPIPE signals as well as connection related
  failures, add some automatic reconnection code and appropriate error
  messages.
tools/virsh.c