[PATCH] virsh: Use old API if remote libvirtd does not support new

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

 



Commit ffe28ab74b821c916ec4ba8efb5c992454e4bd24 introduced regression
while comunicating with older libvirtd command 'domblkstat' used the new
API and did not check for VIR_ERR_RPC error code signalling the remote
server does not support this API and did not fall back to older API.
Thereafter 'domblkstat' ended with "error: unknown procedure: 243".
---
footnote: Will not apply along with:
 [PATCH v5] virsh: Add more human-friendly output of domblkstat command
as that path does fix this bug. 

 tools/virsh.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 3b060bf..430168c 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -1090,7 +1090,8 @@ cmdDomblkstat (vshControl *ctl, const vshCmd *cmd)
      * then.
      */
     if (rc < 0) {
-        if (last_error->code != VIR_ERR_NO_SUPPORT) {
+        if (last_error->code != VIR_ERR_NO_SUPPORT &&
+            last_error->code != VIR_ERR_RPC) {
             virshReportError(ctl);
             goto cleanup;
         } else {
-- 
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]