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
@@ -1619,11 +1639,15 @@ public void orchestrateStart(final String vmUuid, final Map<VirtualMachineProfil
1619
1639
thrownewExecutionException("Unable to start VM:" + vm.getUuid() + " due to error in finalizeStart, not retrying");
1620
1640
}
1621
1641
}
1622
-
logger.info("Unable to start VM on {} due to {}", dest.getHost(), (startAnswer == null ? " no start answer" : startAnswer.getDetails()));
1642
+
Stringmsg = String.format("Unable to start VM on %s due to %s", dest.getHost(), startAnswer == null ? "no start command answer" : startAnswer.getDetails());
1643
+
lastKnownError = newExecutionException(msg);
1644
+
1623
1645
if (startAnswer != null && startAnswer.getContextParam("stopRetry") != null) {
1646
+
logger.error(msg, lastKnownError);
1624
1647
break;
1625
1648
}
1626
1649
1650
+
logger.debug(msg, lastKnownError);
1627
1651
} catch (OperationTimedoutExceptione) {
1628
1652
logger.debug("Unable to send the start command to host {} failed to start VM: {}", dest.getHost(), vm);
1629
1653
if (e.isActive()) {
@@ -1633,6 +1657,7 @@ public void orchestrateStart(final String vmUuid, final Map<VirtualMachineProfil
1633
1657
thrownewAgentUnavailableException("Unable to start " + vm.getHostName(), destHostId, e);
1634
1658
} catch (finalResourceUnavailableExceptione) {
1635
1659
logger.warn("Unable to contact resource.", e);
1660
+
lastKnownError = e;
1636
1661
if (!avoids.add(e)) {
1637
1662
if (e.getScope() == Volume.class || e.getScope() == Nic.class) {
1638
1663
throwe;
@@ -1689,10 +1714,22 @@ public void orchestrateStart(final String vmUuid, final Map<VirtualMachineProfil
1689
1714
}
1690
1715
1691
1716
if (startedVm == null) {
1692
-
thrownewCloudRuntimeException("Unable to start Instance '" + vm.getHostName() + "' (" + vm.getUuid() + "), see management server log for details");
1717
+
StringmessageTmpl = "Unable to start Instance '%s' (%s)%s";
1718
+
Stringdetails;
1719
+
if (canExposeError(account) && lastKnownError != null) {
1720
+
details = ": " + lastKnownError.getMessage();
1721
+
} else {
1722
+
details = ", see management server log for details";
"false", "If set to true, detailed error messages will be returned to all user roles. If false, detailed errors are only shown to admin users", true, ConfigKey.Scope.Global, null);
0 commit comments