You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2015/05/04 11:45:50 UTC

git commit: updated refs/heads/master to e0721fe

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 <ra...@gmail.com>
Authored: Mon May 4 15:11:05 2015 +0530
Committer: Rajani Karuturi <ra...@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;
             }