DaanHoogland commented on a change in pull request #3640: consoleproxy: Enable
console for vms in Stopping/Migrating state
URL: https://github.com/apache/cloudstack/pull/3640#discussion_r351716984
##########
File path: server/src/main/java/com/cloud/server/ManagementServerImpl.java
##########
@@ -2392,7 +2392,12 @@ public String getConsoleAccessUrlRoot(final long vmId) {
s_logger.trace("Trying to retrieve VNC port from agent about VM "
+ vm.getHostName());
}
- final GetVncPortAnswer answer =
(GetVncPortAnswer)_agentMgr.easySend(vm.getHostId(), new
GetVncPortCommand(vm.getId(), vm.getInstanceName()));
+ GetVncPortAnswer answer = null;
+ if (vm.getState() == State.Migrating && vm.getLastHostId() != null) {
+ answer = (GetVncPortAnswer)_agentMgr.easySend(vm.getLastHostId(),
new GetVncPortCommand(vm.getId(), vm.getInstanceName()));
+ } else {
Review comment:
I agree, @weizhouapache these are not big issues. I just wanted to have
mentioned them and am not 👎ing this!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services