mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
conf: storage: Fix duplicate check for gluster pools
The pool name has to be the same too to warrant rejecting a pool definition as duplicate. This regression was introduced in commit 2184ade3a0546b915252cb3b6a5dc88e9a8d2ccf. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1236438
This commit is contained in:
parent
15632a312e
commit
ea1c7b652b
@ -2471,13 +2471,22 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
|
|||||||
if (STREQ(pool->def->target.path, def->target.path))
|
if (STREQ(pool->def->target.path, def->target.path))
|
||||||
matchpool = pool;
|
matchpool = pool;
|
||||||
break;
|
break;
|
||||||
case VIR_STORAGE_POOL_NETFS:
|
|
||||||
case VIR_STORAGE_POOL_GLUSTER:
|
case VIR_STORAGE_POOL_GLUSTER:
|
||||||
|
if (STREQ(pool->def->source.name, def->source.name) &&
|
||||||
|
STREQ_NULLABLE(pool->def->source.dir, def->source.dir) &&
|
||||||
|
virStoragePoolSourceMatchSingleHost(&pool->def->source,
|
||||||
|
&def->source))
|
||||||
|
matchpool = pool;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_STORAGE_POOL_NETFS:
|
||||||
if (STREQ(pool->def->source.dir, def->source.dir) &&
|
if (STREQ(pool->def->source.dir, def->source.dir) &&
|
||||||
virStoragePoolSourceMatchSingleHost(&pool->def->source,
|
virStoragePoolSourceMatchSingleHost(&pool->def->source,
|
||||||
&def->source))
|
&def->source))
|
||||||
matchpool = pool;
|
matchpool = pool;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_STORAGE_POOL_SCSI:
|
case VIR_STORAGE_POOL_SCSI:
|
||||||
if (pool->def->source.adapter.type ==
|
if (pool->def->source.adapter.type ==
|
||||||
VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_FC_HOST &&
|
VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_FC_HOST &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user