Allow multiple simultaneous console viewers for KVM user VMs - #13870
Open
Ericreeses wants to merge 1 commit into
Open
Allow multiple simultaneous console viewers for KVM user VMs#13870Ericreeses wants to merge 1 commit into
Ericreeses wants to merge 1 commit into
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for multiple simultaneous console viewers for the same KVM user VM.
Currently, console proxy sessions for a VM use the VM client tag as the viewer key. When a second user opens the console for the same VM, the existing viewer is replaced and the first user's console session is disconnected.
CloudStack already supports using a unique console session UUID as the viewer key when
sessionRequiresNewVieweris enabled. This change exposes that existing capability for KVM user VMs through a new global setting:consoleproxy.kvm.multiple.viewers.enabledThe setting defaults to
false, preserving the existing single-viewer behavior.When enabled for a KVM user VM, each console request uses a unique viewer session, allowing multiple users to access the same VM console simultaneously.
The change is limited to KVM user VMs. System VMs and other hypervisors retain their existing console behavior.
Fixes: #13869
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate)
N/A
How Has This Been Tested?
Unit tests were added to
ConsoleAccessManagerImplTestcovering:Focused unit test:
mvn -pl server -Dtest=ConsoleAccessManagerImplTest testResult:
Tests run: 39, Failures: 0, Errors: 0, Skipped: 0BUILD SUCCESSThe CloudStack CI-style build was also executed:
mvn -B -P developer,systemvm -Dsimulator -Dnoredist clean install -T$(nproc)Result:
BUILD SUCCESSThe feature was additionally validated manually with CloudStack 4.22.1.0 and KVM. With the existing behavior, opening the same VM console from a second user disconnects the first user. After enabling per-session viewers, two users were able to remain connected to the same KVM VM console simultaneously.
How did you try to break this feature and the system with this change?
The global setting defaults to
false, and unit testing verifies that the existing single-viewer behavior remains unchanged when it is disabled.The feature is explicitly restricted to KVM user VMs. A unit test verifies that KVM system VMs do not receive the new viewer behavior even when the setting is enabled.
Existing Hyper-V and external-console tests in
ConsoleAccessManagerImplTestalso continue to pass.The complete CloudStack developer/systemvm simulator build passed after the change.
Reviewer Test Procedure
consoleproxy.kvm.multiple.viewers.enabledtrue.consoleproxy.kvm.multiple.viewers.enabledback tofalse.