mirror of https://gitee.com/openkylin/libvirt.git
storage: Add duplicate host check for Sheepdog pool def
Check the proposed pool source host XML definition against existing sheepdog pools to ensure the incoming definition doesn't use the same source host XML definition as an existing pool.
This commit is contained in:
parent
556a21f9fb
commit
521add056e
|
@ -2544,9 +2544,13 @@ virStoragePoolSourceFindDuplicate(virConnectPtr conn,
|
|||
case VIR_STORAGE_POOL_DISK:
|
||||
matchpool = virStoragePoolSourceFindDuplicateDevices(pool, def);
|
||||
break;
|
||||
case VIR_STORAGE_POOL_SHEEPDOG:
|
||||
if (virStoragePoolSourceMatchSingleHost(&pool->def->source,
|
||||
&def->source))
|
||||
matchpool = pool;
|
||||
break;
|
||||
case VIR_STORAGE_POOL_MPATH:
|
||||
case VIR_STORAGE_POOL_RBD:
|
||||
case VIR_STORAGE_POOL_SHEEPDOG:
|
||||
case VIR_STORAGE_POOL_GLUSTER:
|
||||
case VIR_STORAGE_POOL_ZFS:
|
||||
case VIR_STORAGE_POOL_LAST:
|
||||
|
|
Loading…
Reference in New Issue