CLOUDSTACK-4459: need to sychronize create storage pool, otherwise, we can create the same pool with the same uuid in parallel

This commit is contained in:
Edison Su 2013-08-26 11:15:30 -07:00
parent aa59b6f34d
commit 9fa56e28ec
1 changed files with 2 additions and 1 deletions

View File

@ -173,7 +173,8 @@ public class KVMStoragePoolManager {
return createStoragePool(name, host, port, path, userInfo, type, true);
}
private KVMStoragePool createStoragePool( String name, String host, int port,
//Note: due to bug CLOUDSTACK-4459, createStoragepool can be called in parallel, so need to be synced.
private synchronized KVMStoragePool createStoragePool( String name, String host, int port,
String path, String userInfo,
StoragePoolType type, boolean primaryStorage) {
StorageAdaptor adaptor = getStorageAdaptor(type);