rhtyd closed pull request #2794: vmware: reboot VR after mac updates URL: https://github.com/apache/cloudstack/pull/2794
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java index e6c0a8da6ec..e9cf926ac5a 100644 --- a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java +++ b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java @@ -401,9 +401,9 @@ public ConsoleProxyVO doAssignProxy(long dataCenterId, long vmId) { return null; } - if (vm != null && vm.getState() != State.Running) { + if (vm != null && vm.getState() != State.Starting && vm.getState() != State.Running) { if (s_logger.isInfoEnabled()) { - s_logger.info("Detected that vm : " + vmId + " is not currently at running state, we will fail the proxy assignment for it"); + s_logger.info("Detected that vm : " + vmId + " is not currently in starting or running state, we will fail the proxy assignment for it"); } return null; } diff --git a/systemvm/debian/opt/cloud/bin/setup/router.sh b/systemvm/debian/opt/cloud/bin/setup/router.sh index f41e57e6375..2a8a4ad5d56 100755 --- a/systemvm/debian/opt/cloud/bin/setup/router.sh +++ b/systemvm/debian/opt/cloud/bin/setup/router.sh @@ -61,6 +61,10 @@ setup_router() { then log_it "Reloading udev for new udev NIC assignment" udevadm control --reload-rules && udevadm trigger + if [ "$HYPERVISOR" == "vmware" ]; then + sync + reboot + fi fi fi diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 1a2a6409cca..f33aac027ff 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -3292,6 +3292,9 @@ allowedActions.push("resetSSHKeyForVirtualMachine"); } else if (jsonObj.state == 'Starting') { // allowedActions.push("stop"); + if (isAdmin()) { + allowedActions.push("viewConsole"); + } } else if (jsonObj.state == 'Error') { allowedActions.push("destroy"); } else if (jsonObj.state == 'Expunging') { diff --git a/ui/scripts/system.js b/ui/scripts/system.js index ef944d958db..b568d49fe72 100755 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -22140,6 +22140,10 @@ if (isAdmin()) allowedActions.push("migrate"); + } else if (jsonObj.state == 'Starting') { + if (isAdmin()) { + allowedActions.push("viewConsole"); + } } else if (jsonObj.state == 'Stopped') { allowedActions.push("start"); @@ -22157,10 +22161,13 @@ if (jsonObj.state == 'Running') { allowedActions.push("stop"); - allowedActions.push("viewConsole"); if (isAdmin()) allowedActions.push("migrate"); + } else if (jsonObj.state == 'Starting') { + if (isAdmin()) { + allowedActions.push("viewConsole"); + } } else if (jsonObj.state == 'Stopped') { allowedActions.push("start"); } @@ -22184,6 +22191,10 @@ allowedActions.push("viewConsole"); if (isAdmin()) allowedActions.push("migrate"); + } else if (jsonObj.state == 'Starting') { + if (isAdmin()) { + allowedActions.push("viewConsole"); + } } else if (jsonObj.state == 'Stopped') { allowedActions.push("start"); ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services