Skip to content

Commit 7416383

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 f2ea699 commit 7416383

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
@@ -1052,6 +1052,11 @@ protected Pair<Map<Volume, List<StoragePool>>, List<Volume>> findSuitablePoolsFo
10521052
Map<Volume, List<StoragePool>> suitableVolumeStoragePools = new HashMap<Volume, List<StoragePool>>();
10531053
List<Volume> readyAndReusedVolumes = new ArrayList<Volume>();
10541054

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

0 commit comments

Comments
 (0)