[PATCH] storage: Fix startup issue for logical pool

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

 



Commit id '71b803ac' assumed that the storage pool source device path
was required for a 'logical' pool. This resulted in a failure to start
a pool without any device path defined.

So, adjust the virStorageBackendLogicalMatchPoolSource logic to
return success if at least the pool name matches the vgs output
when no pool source device path is/are provided.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/storage/storage_backend_logical.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
index c52782f..f59684a 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -541,6 +541,15 @@ virStorageBackendLogicalMatchPoolSource(virStoragePoolObjPtr pool)
         goto cleanup;
     }
 
+    /* If the pool has defined source device(s), then let's make sure
+     * they match as well; otherwise, matching can only occur on the
+     * pool's name.
+     */
+    if (!pool->def->source.ndevice) {
+        ret = true;
+        goto cleanup;
+    }
+
     /* Let's make sure the pool's device(s) match what the pvs output has
      * for volume group devices.
      */
-- 
2.5.0

--
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]