mirror of https://github.com/apache/cloudstack.git
vmware: reboot VR after mac updates (#2794)
This re-introduces the rebooting of VR after setup of nics/macs in case of VMware. It also adds a minor enhancement to show the console esp. for root admins when VRs and systemvms are in starting state. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
ecb44a5e72
commit
461c4ad027
|
|
@ -401,9 +401,9 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm != null && vm.getState() != State.Running) {
|
if (vm != null && vm.getState() != State.Starting && vm.getState() != State.Running) {
|
||||||
if (s_logger.isInfoEnabled()) {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,10 @@ setup_router() {
|
||||||
then
|
then
|
||||||
log_it "Reloading udev for new udev NIC assignment"
|
log_it "Reloading udev for new udev NIC assignment"
|
||||||
udevadm control --reload-rules && udevadm trigger
|
udevadm control --reload-rules && udevadm trigger
|
||||||
|
if [ "$HYPERVISOR" == "vmware" ]; then
|
||||||
|
sync
|
||||||
|
reboot
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3292,6 +3292,9 @@
|
||||||
allowedActions.push("resetSSHKeyForVirtualMachine");
|
allowedActions.push("resetSSHKeyForVirtualMachine");
|
||||||
} else if (jsonObj.state == 'Starting') {
|
} else if (jsonObj.state == 'Starting') {
|
||||||
// allowedActions.push("stop");
|
// allowedActions.push("stop");
|
||||||
|
if (isAdmin()) {
|
||||||
|
allowedActions.push("viewConsole");
|
||||||
|
}
|
||||||
} else if (jsonObj.state == 'Error') {
|
} else if (jsonObj.state == 'Error') {
|
||||||
allowedActions.push("destroy");
|
allowedActions.push("destroy");
|
||||||
} else if (jsonObj.state == 'Expunging') {
|
} else if (jsonObj.state == 'Expunging') {
|
||||||
|
|
|
||||||
|
|
@ -22140,6 +22140,10 @@
|
||||||
|
|
||||||
if (isAdmin())
|
if (isAdmin())
|
||||||
allowedActions.push("migrate");
|
allowedActions.push("migrate");
|
||||||
|
} else if (jsonObj.state == 'Starting') {
|
||||||
|
if (isAdmin()) {
|
||||||
|
allowedActions.push("viewConsole");
|
||||||
|
}
|
||||||
} else if (jsonObj.state == 'Stopped') {
|
} else if (jsonObj.state == 'Stopped') {
|
||||||
allowedActions.push("start");
|
allowedActions.push("start");
|
||||||
|
|
||||||
|
|
@ -22157,10 +22161,13 @@
|
||||||
|
|
||||||
if (jsonObj.state == 'Running') {
|
if (jsonObj.state == 'Running') {
|
||||||
allowedActions.push("stop");
|
allowedActions.push("stop");
|
||||||
|
|
||||||
allowedActions.push("viewConsole");
|
allowedActions.push("viewConsole");
|
||||||
if (isAdmin())
|
if (isAdmin())
|
||||||
allowedActions.push("migrate");
|
allowedActions.push("migrate");
|
||||||
|
} else if (jsonObj.state == 'Starting') {
|
||||||
|
if (isAdmin()) {
|
||||||
|
allowedActions.push("viewConsole");
|
||||||
|
}
|
||||||
} else if (jsonObj.state == 'Stopped') {
|
} else if (jsonObj.state == 'Stopped') {
|
||||||
allowedActions.push("start");
|
allowedActions.push("start");
|
||||||
}
|
}
|
||||||
|
|
@ -22184,6 +22191,10 @@
|
||||||
allowedActions.push("viewConsole");
|
allowedActions.push("viewConsole");
|
||||||
if (isAdmin())
|
if (isAdmin())
|
||||||
allowedActions.push("migrate");
|
allowedActions.push("migrate");
|
||||||
|
} else if (jsonObj.state == 'Starting') {
|
||||||
|
if (isAdmin()) {
|
||||||
|
allowedActions.push("viewConsole");
|
||||||
|
}
|
||||||
} else if (jsonObj.state == 'Stopped') {
|
} else if (jsonObj.state == 'Stopped') {
|
||||||
allowedActions.push("start");
|
allowedActions.push("start");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue