Skip to content

Commit 8dfd34c

Browse files
author
Prachi Damle
committed
CLOUDSTACK-4651: Restarting management server when volume Snapshot is still in progress for root volume of a VM , then there is no way to restart VM since the startVM job is stuck forever since the volume is in "Snapshoting" state.
Change: -If no volume of the VM is usable, VM cannot be deployed or started. Atleast ROOT volume should always be in usable state to start up the VM
1 parent f3be68a commit 8dfd34c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,6 +1054,11 @@ protected Pair<Map<Volume, List<StoragePool>>, List<Volume>> findSuitablePoolsFo
10541054
Map<Volume, List<StoragePool>> suitableVolumeStoragePools = new HashMap<Volume, List<StoragePool>>();
10551055
List<Volume> readyAndReusedVolumes = new ArrayList<Volume>();
10561056

1057+
// There should be atleast the ROOT volume of the VM in usable state
1058+
if (volumesTobeCreated.isEmpty()) {
1059+
throw new CloudRuntimeException("Unable to create deployment, no usable volumes found for the VM");
1060+
}
1061+
10571062
// for each volume find list of suitable storage pools by calling the
10581063
// allocators
10591064
for (VolumeVO toBeCreated : volumesTobeCreated) {

0 commit comments

Comments
 (0)