cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [11/12] git commit: updated refs/heads/ui-restyle to d0e8fa3
Date Mon, 04 Nov 2013 22:36:19 GMT
Fix NPE due to race condition during system vm launch.


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

Branch: refs/heads/ui-restyle
Commit: eb9cfffd246267bbb5fe4befeb9afeaaf366874a
Parents: 5ccf3a9
Author: Min Chen <min.chen@citrix.com>
Authored: Mon Nov 4 14:26:42 2013 -0800
Committer: Min Chen <min.chen@citrix.com>
Committed: Mon Nov 4 14:27:04 2013 -0800

----------------------------------------------------------------------
 .../src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb9cfffd/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 86e49f9..5818aa8 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
@@ -453,6 +453,7 @@ public class VolumeServiceImpl implements VolumeService {
         } catch (Throwable e) {
             s_logger.debug("failed to create template on storage", e);
             templateOnPrimaryStoreObj.processEvent(Event.OperationFailed);
+            dataStore.create(template);  // make sure that template_spool_ref entry is still
present so that the second thread can acquire the lock
             VolumeApiResult result = new VolumeApiResult(volume);
             result.setResult(e.toString());
             future.complete(result);


Mime
View raw message