]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
scsi: Force error for SCSI pools on virStorageBackendSCSIFindLUs failure
authorJohn Ferlan <jferlan@redhat.com>
Tue, 23 Jun 2015 18:40:31 +0000 (14:40 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 24 Jun 2015 13:18:59 +0000 (09:18 -0400)
Related to :

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

Rather than ignore the return status from virStorageBackendSCSIFindLUs,
cause a failure to start the pool if a -1 is returned. Issue was noted
during testing of the bz for iscsi that 'scsi' and 'fc' pools don't fail.

src/storage/storage_backend_scsi.c

index b426145326da4af24032c54e5e48537795371420..a593a2b43e4ac82a48d66a3860cb984bc14a7990 100644 (file)
@@ -935,7 +935,8 @@ virStorageBackendSCSIRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED,
     if (virStorageBackendSCSITriggerRescan(host) < 0)
         goto out;
 
-    ignore_value(virStorageBackendSCSIFindLUs(pool, host));
+    if (virStorageBackendSCSIFindLUs(pool, host) < 0)
+        goto out;
 
     ret = 0;
  out: