Skip to content

Commit 9fa56e2

Browse files
committed
CLOUDSTACK-4459: need to sychronize create storage pool, otherwise, we can create the same pool with the same uuid in parallel
1 parent aa59b6f commit 9fa56e2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ public KVMStoragePool createStoragePool( String name, String host, int port,
173173
return createStoragePool(name, host, port, path, userInfo, type, true);
174174
}
175175

176-
private KVMStoragePool createStoragePool( String name, String host, int port,
176+
//Note: due to bug CLOUDSTACK-4459, createStoragepool can be called in parallel, so need to be synced.
177+
private synchronized KVMStoragePool createStoragePool( String name, String host, int port,
177178
String path, String userInfo,
178179
StoragePoolType type, boolean primaryStorage) {
179180
StorageAdaptor adaptor = getStorageAdaptor(type);

0 commit comments

Comments
 (0)