[PATCH RFCv2 5/5] virsh: Reconnect to daemon if remote netcat crashes while using libssh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch enables reconnection if for some reason remote netcat, that
is connecting libvirt daemon to the ssh transport layer crashes.

* tools/virsh.c: Add support for Libssh's error code
---
 tools/virsh.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 0bc0519..682251c 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -17048,7 +17048,8 @@ vshCommandRun(vshControl *ctl, const vshCmd *cmd)
                (last_error->domain == VIR_FROM_REMOTE)) ||
               (last_error->code == VIR_ERR_RPC) ||
               (last_error->code == VIR_ERR_NO_CONNECT) ||
-              (last_error->code == VIR_ERR_INVALID_CONN))))
+              (last_error->code == VIR_ERR_INVALID_CONN) ||
+              (last_error->code == VIR_ERR_LIBSSH_REMOTE_COMMAND))))
             disconnected++;

         if (!ret)
-- 
1.7.3.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]