Fixed CLOUDSTACK-2081 Volume which is added thru upload volume is failed to attach to the instance saying Volume state must be in Allocated, Ready or in Uploaded state( Though uploaded Volume state is uploaded)
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/107f4924 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/107f4924 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/107f4924 Branch: refs/heads/rbd-snap-clone Commit: 107f4924757d6d59bff4256a56df3c8e81763818 Parents: 28c5fbc Author: Rajesh Battala <rajesh.batt...@citrix.com> Authored: Thu May 9 18:02:41 2013 +0530 Committer: Devdeep Singh <devd...@gmail.com> Committed: Fri May 17 14:58:25 2013 +0530 ---------------------------------------------------------------------- .../storage/volume/VolumeServiceImpl.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/107f4924/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 2625354..7fdf6bb 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 @@ -748,11 +748,11 @@ public class VolumeServiceImpl implements VolumeService { protected Void registerVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CreateCmdResult> callback, CreateVolumeContext<VolumeApiResult> context) { CreateCmdResult result = callback.getResult(); VolumeObject vo = (VolumeObject)context.volume; - /*if (result.isFailed()) { + if (result.isFailed()) { vo.stateTransit(Volume.Event.OperationFailed); } else { vo.stateTransit(Volume.Event.OperationSucceeded); - }*/ + } VolumeApiResult res = new VolumeApiResult(vo); context.future.complete(res); return null;