Skip to content

consoleproxy: Enable console for vms in Stopping/Migrating state#3640

Merged
DaanHoogland merged 1 commit into
apache:4.13from
ustcweizhou:vm-console-improvement
Nov 28, 2019
Merged

consoleproxy: Enable console for vms in Stopping/Migrating state#3640
DaanHoogland merged 1 commit into
apache:4.13from
ustcweizhou:vm-console-improvement

Conversation

@ustcweizhou

Copy link
Copy Markdown
Contributor

Description

Currently vm console is not enabled if vm is in stopping or migrating.
Enabling vm console will help us

Fixes: #3631

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Screenshots (if appropriate):

How Has This Been Tested?

@ustcweizhou
ustcweizhou force-pushed the vm-console-improvement branch from 6d3c7da to 27f5dcb Compare October 17, 2019 09:46
@ustcweizhou
ustcweizhou force-pushed the vm-console-improvement branch from 27f5dcb to 9f8ef74 Compare October 17, 2019 10:40
@ustcweizhou

Copy link
Copy Markdown
Contributor Author

@andrijapanicsb this fixes your issue #3631

@svenvogel

Copy link
Copy Markdown
Contributor

@ustcweizhou nice enhancement!

@andrijapanicsb

Copy link
Copy Markdown
Contributor

I need to improve my Outlook filter (to see some of those almost 10.000 emails)

Thanks @ustcweizhou
@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@andrijapanicsb a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-321

@andrijapanicsb

Copy link
Copy Markdown
Contributor

Tested, looks fine, thx @ustcweizhou

LGTM

@yadvr yadvr added this to the 4.13.1.0 milestone Oct 22, 2019
@svenvogel

Copy link
Copy Markdown
Contributor

@weizhouapache sounds intresting. not tested but i hope it will go into the master. we encounter the same problem.

@ustcweizhou

Copy link
Copy Markdown
Contributor Author

@rhtyd @andrijapanicsb can you kick off a test again ?

@andrijapanicsb

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@andrijapanicsb a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-557)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 42290 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3640-t557-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Smoke tests completed. 77 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@apache apache deleted a comment from blueorangutan Nov 28, 2019
@apache apache deleted a comment from blueorangutan Nov 28, 2019
@apache apache deleted a comment from blueorangutan Nov 28, 2019
@apache apache deleted a comment from blueorangutan Nov 28, 2019
@andrijapanicsb

Copy link
Copy Markdown
Contributor

need one more LGTM from code POV, otherwise tested manually fine and tests are passing.

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am fine with the code 👍 and with the functionality, it no longer requires you to be admin to open the console in some instances, which is fine by me.
the jenkins/travis tests have failed, giving it a quick look.

Comment on lines +404 to +405
if (vm != null && vm.getState() != State.Starting && vm.getState() != State.Running
&& vm.getState() != State.Stopping && vm.getState() != State.Migrating) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:) a lot of getState()s there

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@DaanHoogland not very much , only 4 :-)
will pay attention in the future.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

NP, code can be such a joy.

Comment on lines +2396 to +2398
if (vm.getState() == State.Migrating && vm.getLastHostId() != null) {
answer = (GetVncPortAnswer)_agentMgr.easySend(vm.getLastHostId(), new GetVncPortCommand(vm.getId(), vm.getInstanceName()));
} else {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So we are making the decision we are opening a console to the old VM. looks good but may have some problems. I suspect you tested @ustcweizhou .
problems I see are:

  • this is a second migrate and the old host is no longer valid.
  • the migration is already successful but not administered yet.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@DaanHoogland indeed there are some problems with vm console, for example
(1) vm is Starting state, but is not running on any server (eg applying dhcp/dns entries in virtual routers)
(2) vm is Stopping state, but is stopped on server
(3) vm is Migrating state, when we open the console of vm (on source host), and migration is done, the console is invalid.
However, I think all these problems are not real issues. When vm state is updated, refresh the web page and a new console will work.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree, @weizhouapache these are not big issues. I just wanted to have mentioned them and am not 👎ing this!

@DaanHoogland

Copy link
Copy Markdown
Contributor

travis job 5 ran out of log space. this has happened more often recently. no issue concerning this PR afaiac

@DaanHoogland
DaanHoogland merged commit 94474af into apache:4.13 Nov 28, 2019
DaanHoogland added a commit that referenced this pull request Nov 28, 2019
* 4.13:
  consoleproxy: Enable console for vms in Stopping/Migrating state (#3640)
ustcweizhou added a commit to ustcweizhou/cloudstack that referenced this pull request Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants