mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-2276: NPE while attaching the volume to the instance which is created from ROOT Disk Snapshot
The NPE comes as the storage pool id is set to null in the in-memory volume object which is not in sync with the db. entry. Reloading the volume from db. fixes the issue
This commit is contained in:
parent
3115ddf007
commit
fd79f6b602
@ -1725,6 +1725,8 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
|
||||
}
|
||||
}
|
||||
|
||||
// reload the volume from db
|
||||
volumeOnPrimaryStorage = volFactory.getVolume(volumeOnPrimaryStorage.getId());
|
||||
boolean moveVolumeNeeded = needMoveVolume(rootVolumeOfVm, volumeOnPrimaryStorage);
|
||||
|
||||
if (moveVolumeNeeded) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user