Re: [libvirt] [PATCH] Make virsh reconnect when loosing connection

2010-03-10 Thread Daniel Veillard
On Fri, Mar 05, 2010 at 04:18:48PM -0500, Laine Stump wrote: > On 03/05/2010 05:11 AM, Daniel Veillard wrote: > >@@ -8343,6 +8399,17 @@ vshCommandRun(vshControl *ctl, const vshCmd *cmd) > > if (ret == FALSE) > > virshReportError(ctl); > > > >+/* try to catch automatica

Re: [libvirt] [PATCH] Make virsh reconnect when loosing connection

2010-03-10 Thread Daniel Veillard
On Fri, Mar 05, 2010 at 03:33:10PM -0500, Laine Stump wrote: > I applied this patch and tried it out. It appears to work as > advertised, which is useful. Would be even better if there was some > higher level handling to automatically retry the commands that fail > due to sigpipe. > > Beyond that,

Re: [libvirt] [PATCH] Make virsh reconnect when loosing connection

2010-03-05 Thread Laine Stump
On 03/05/2010 05:11 AM, Daniel Veillard wrote: @@ -8343,6 +8399,17 @@ vshCommandRun(vshControl *ctl, const vshCmd *cmd) if (ret == FALSE) virshReportError(ctl); +/* try to catch automatically disconnections */ +if ((ret == FALSE)&& Also, there's a tr

Re: [libvirt] [PATCH] Make virsh reconnect when loosing connection

2010-03-05 Thread Laine Stump
I applied this patch and tried it out. It appears to work as advertised, which is useful. Would be even better if there was some higher level handling to automatically retry the commands that fail due to sigpipe. Beyond that, I noticed a few typos, but don't have enough expertise about signals

[libvirt] [PATCH] Make virsh reconnect when loosing connection

2010-03-05 Thread Daniel Veillard
This is a usability issue for virsh in case of disconnections, for example if the remote libvirtd is restarted: https://bugzilla.redhat.com/show_bug.cgi?id=526656 the patch catch those and tries to automatically reconnect instead of virsh exitting. The typical interaction with this patch is th