Updated Branches:
  refs/heads/object_store 1b8e7aba7 -> 0e2877295

fix race condition, when multiple vms on the same templates are started at the 
same time


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

Branch: refs/heads/object_store
Commit: 0e28772957d2e317bc3f0197c2e567ce1c914123
Parents: 1b8e7ab
Author: Edison Su <sudi...@gmail.com>
Authored: Mon May 6 19:04:41 2013 -0700
Committer: Edison Su <sudi...@gmail.com>
Committed: Mon May 6 19:04:41 2013 -0700

----------------------------------------------------------------------
 .../storage/volume/VolumeServiceImpl.java          |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0e287729/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
 
b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
index 57dd660..833f079 100644
--- 
a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
+++ 
b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
@@ -363,18 +363,17 @@ public class VolumeServiceImpl implements VolumeService {
                    s_logger.debug("wait for template:" + template.getId() + " 
downloading finished, but failed");
                    VolumeApiResult result = new VolumeApiResult(volume);
                    result.setResult(e1.toString());
-                   caller.complete(result);
+                   future.complete(result);
                    return;
                }
                if (templateOnPrimaryStoreObj == null) {
                    VolumeApiResult result = new VolumeApiResult(volume);
                 result.setResult("wait for template:" + template.getId() + " 
downloading finished, but failed");
-                caller.complete(result);
+                future.complete(result);
                 return;
                } else {
                    s_logger.debug("waiting for template:" + template.getId() + 
" downloading finished, success");
-                   VolumeApiResult result = new VolumeApiResult(volume);
-                   future.complete(result);
+                   createVolumeFromBaseImageAsync(volume, 
templateOnPrimaryStoreObj, dataStore, future);
                    return;
                }
         }

Reply via email to