You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit eb43f78
Browse filesBrowse the repository at this point in the historyBrowse files
prachi
committed
Bug 13824 - VM deployment fails due to volume not being recreatable
Reviewed-By: Alex
Changes:
- Reuse the same storagepool where the Volume is ready on each retry of VM deployment until the cluster where the volume is has capacity
- After the cluster is out of capacity, we look in other clusters and find a new storagepool.
- At this point if the volume is recreatable on the new storagepool, depoyment will succeed provided everytyhing else goes through
- But if the volume is not recreatable and its cluster is out of capacity, we will still fail to deploy the VM
if (clusterIdSpecified != null && rootVolClusterId != null) {
682
+
if (rootVolClusterId.longValue() != clusterIdSpecified.longValue()) {
683
+
// cannot satisfy the plan passed in to the
684
+
// planner
685
+
if (s_logger.isDebugEnabled()) {
686
+
s_logger.debug("Cannot satisfy the deployment plan passed in since the ready Root volume is in different cluster. volume's cluster: " + rootVolClusterId
687
+
+ ", cluster specified: " + clusterIdSpecified);
688
+
}
689
+
thrownewResourceUnavailableException("Root volume is ready in different cluster, Deployment plan provided cannot be satisfied, unable to create a deployment for "
690
+
+ vm, Cluster.class, clusterIdSpecified);
691
+
}
692
+
}
693
+
plan = newDataCenterDeployment(planToDeploy.getDataCenterId(), planToDeploy.getPodId(), planToDeploy.getClusterId(), planToDeploy.getHostId(), vol.getPoolId(), null);
694
+
}else{
695
+
plan = newDataCenterDeployment(rootVolDcId, rootVolPodId, rootVolClusterId, null, vol.getPoolId(), null);
679
696
if (s_logger.isDebugEnabled()) {
680
-
s_logger.debug("Cannot satisfy the deployment plan passed in since the ready Root volume is in different cluster. volume's cluster: " + rootVolClusterId
681
-
+ ", cluster specified: " + clusterIdSpecified);
697
+
s_logger.debug(vol + " is READY, changing deployment plan to use this pool's dcId: " + rootVolDcId + " , podId: " + rootVolPodId + " , and clusterId: " + rootVolClusterId);
682
698
}
683
-
thrownewResourceUnavailableException("Root volume is ready in different cluster, Deployment plan provided cannot be satisfied, unable to create a deployment for "
684
-
+ vm, Cluster.class, clusterIdSpecified);
699
+
planChangedByVolume = true;
685
700
}
686
701
}
687
-
plan = newDataCenterDeployment(planToDeploy.getDataCenterId(), planToDeploy.getPodId(), planToDeploy.getClusterId(), planToDeploy.getHostId(), vol.getPoolId(), null);
688
-
}else{
689
-
plan = newDataCenterDeployment(rootVolDcId, rootVolPodId, rootVolClusterId, null, vol.getPoolId(), null);
690
-
if (s_logger.isDebugEnabled()) {
691
-
s_logger.debug(vol + " is READY, changing deployment plan to use this pool's dcId: " + rootVolDcId + " , podId: " + rootVolPodId + " , and clusterId: " + rootVolClusterId);
692
-
}
693
-
planChangedByVolume = true;
694
-
if (vol.isRecreatable()) {
695
-
rootVolumeisRecreatable = true;
696
-
}
697
-
698
702
}
699
703
}
700
-
}
701
-
702
-
intretry = _retry;
703
-
while (retry-- != 0) { // It's != so that it can match -1.
0 commit comments