cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject [08/24] git commit: updated refs/heads/master to 81ff479
Date Thu, 26 Sep 2013 01:01:12 GMT
CLOUDSTACK-4459: need to sychronize create storage pool, otherwise, we can create the same
pool with the same uuid in parallel


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9fa56e28
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9fa56e28
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9fa56e28

Branch: refs/heads/master
Commit: 9fa56e28ec0c6bd4b71de6f0804f58cf4bc94aae
Parents: aa59b6f
Author: Edison Su <sudison@gmail.com>
Authored: Mon Aug 26 11:15:30 2013 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Wed Sep 25 16:09:11 2013 -0700

----------------------------------------------------------------------
 .../com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9fa56e28/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java
index 71bbc15..7fef6ff 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java
@@ -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);


Mime
View raw message