cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject git commit: updated refs/heads/master to e0721fe
Date Mon, 04 May 2015 09:45:50 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master ff4f31c4e -> e0721fe97


volume upload: when create template fails, rolling back transaction


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

Branch: refs/heads/master
Commit: e0721fe9768962c0e1efdb13c93703ac2b1bf8b0
Parents: ff4f31c
Author: Rajani Karuturi <rajanikaruturi@gmail.com>
Authored: Mon May 4 15:11:05 2015 +0530
Committer: Rajani Karuturi <rajanikaruturi@gmail.com>
Committed: Mon May 4 15:15:33 2015 +0530

----------------------------------------------------------------------
 server/src/com/cloud/template/HypervisorTemplateAdapter.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e0721fe9/server/src/com/cloud/template/HypervisorTemplateAdapter.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/template/HypervisorTemplateAdapter.java b/server/src/com/cloud/template/HypervisorTemplateAdapter.java
index 369262b..0b7854e 100644
--- a/server/src/com/cloud/template/HypervisorTemplateAdapter.java
+++ b/server/src/com/cloud/template/HypervisorTemplateAdapter.java
@@ -284,6 +284,9 @@ public class HypervisorTemplateAdapter extends TemplateAdapterBase {
                     payload.setDescription(template.getDisplayText());
                     payloads.add(payload);
                 }
+                if(payloads.isEmpty()) {
+                    throw new CloudRuntimeException("unable to find zone or an image store
with enough capacity");
+                }
                 _resourceLimitMgr.incrementResourceCount(profile.getAccountId(), ResourceType.template);
                 return payloads;
             }


Mime
View raw message