Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 4 additions & 0 deletions systemvm/debian/opt/cloud/bin/setup/router.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are in systemd time now I would use:

systemctl reboot

But hey, that's a very, very, very minor thing.

fi
fi
fi

Expand Down
3 changes: 3 additions & 0 deletions ui/scripts/instances.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
13 changes: 12 additions & 1 deletion ui/scripts/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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");
}
Expand All @@ -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");

Expand Down