You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ko...@apache.org on 2014/08/20 14:10:11 UTC
git commit: updated refs/heads/master to 8d08178
Repository: cloudstack
Updated Branches:
refs/heads/master ab7c1f34d -> 8d0817860
CLOUDSTACK-7337: Volume state remains in allocated after volume creation faliure from snapshot Volume should be marked to Destroy state after creation faliure.
Signed-off-by: Koushik Das <ko...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8d081786
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8d081786
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8d081786
Branch: refs/heads/master
Commit: 8d0817860faa347eb738c28d30c98f549afb3096
Parents: ab7c1f3
Author: Harikrishna Patnala <ha...@citrix.com>
Authored: Tue Aug 12 16:49:39 2014 +0530
Committer: Koushik Das <ko...@apache.org>
Committed: Wed Aug 20 17:39:53 2014 +0530
----------------------------------------------------------------------
server/src/com/cloud/storage/VolumeApiServiceImpl.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8d081786/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
index 8d83225..11d1f73 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -659,8 +659,9 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
return volume;
} catch (Exception e) {
created = false;
- s_logger.debug("Failed to create volume: " + volume.getId(), e);
- return null;
+ VolumeInfo vol = volFactory.getVolume(cmd.getEntityId());
+ vol.stateTransit(Volume.Event.DestroyRequested);
+ throw new CloudRuntimeException("Failed to create volume: " + volume.getId(), e);
} finally {
if (!created) {
s_logger.trace("Decrementing volume resource count for account id=" + volume.getAccountId() + " as volume failed to create on the backend");