CLOUDSTACK-8320. Upon a failed migration, a dummy volume is created which remains in 'Expunging' state.
Set destination volume path as NULL while duplicating volume during migration. If migration fails, destination volume will be marked as removed. And if migration succeeds, volume path will be rightly updated. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d30d5644 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d30d5644 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d30d5644 Branch: refs/heads/master Commit: d30d5644bb59898ac60884280bd0767bf429ede8 Parents: bdd28a4 Author: Likitha Shetty <likitha.she...@citrix.com> Authored: Wed Feb 11 16:10:50 2015 +0530 Committer: Likitha Shetty <likitha.she...@citrix.com> Committed: Thu Mar 12 11:57:02 2015 +0530 ---------------------------------------------------------------------- .../src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d30d5644/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 4ff28d7..325c269 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 @@ -833,6 +833,7 @@ public class VolumeServiceImpl implements VolumeService { VolumeVO newVol = new VolumeVO(volume); newVol.setInstanceId(null); newVol.setChainInfo(null); + newVol.setPath(null); newVol.setFolder(folder); newVol.setPodId(pool.getPodId()); newVol.setPoolId(pool.getId());