]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: bulk stats: Ignore errors from missing/inaccessible disks
authorPeter Krempa <pkrempa@redhat.com>
Wed, 15 Apr 2015 16:14:30 +0000 (18:14 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 16 Apr 2015 07:24:04 +0000 (09:24 +0200)
Rather than erroring out make the best attempt to retrieve other data if
disks are inaccessible or missing. The failure will still be logged
though.

Since the bulk stats API is called on multiple domains an error like
this makes the API unusable. This regression was introduced by commit
596a13713420e01b20ce3dc3fdbe06d073682675

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1209394

src/qemu/qemu_driver.c

index 01e01225b5f46f091b59babc445e29a38e8f29f1..f37b95dda76fe048c6ec20f52678e047fec35f5c 100644 (file)
@@ -19301,8 +19301,13 @@ qemuDomainGetStatsOneBlock(virQEMUDriverPtr driver,
             ret = 0;
             goto cleanup;
         }
-        if (qemuStorageLimitsRefresh(driver, cfg, dom, src) < 0)
+
+        if (qemuStorageLimitsRefresh(driver, cfg, dom, src) < 0) {
+            virResetLastError();
+            ret = 0;
             goto cleanup;
+        }
+
         if (src->allocation)
             QEMU_ADD_BLOCK_PARAM_ULL(record, maxparams, block_idx,
                                      "allocation", src->allocation);