Skip to content

Conversation

Pearl1594
Copy link
Contributor

@Pearl1594 Pearl1594 commented Aug 7, 2025

Description

This PR moves console proxy related global settings to Zone level as CPVM in a zone level resource, and it makes sense to have these settings at the zone level

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)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Screenshots (if appropriate):

How Has This Been Tested?

For dev-testing, I added logs in the ConsoleProxyManagerImpl::scanPool method that's called every 30sec to check the zone & global level values to identify if they are correctly set:

When no zone level values are set:

2025-08-22 14:47:54,358 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) Configuration values for CPVM in zone 1: 
2025-08-22 14:47:54,359 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) SSL enabled: Zone level: false - Global level: false
2025-08-22 14:47:54,361 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) NoVNC console default: Zone level: true - Global level: true
2025-08-22 14:47:54,363 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) Console proxy service offering: Zone level: null - Global level: null
2025-08-22 14:47:54,365 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) Console proxy standby capacity: Zone level: 10 - Global level: 10
2025-08-22 14:47:54,366 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) Console proxy capacity scan interval: Zone level: 30000 - Global level: 30000
2025-08-22 14:47:54,367 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) Console proxy command port: Zone level: 8001 - Global level: 8001
2025-08-22 14:47:54,368 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) Console proxy restart: Zone level: true - Global level: true
2025-08-22 14:47:54,369 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) Console proxy URL domain: Zone level:  - Global level: 
2025-08-22 14:47:54,371 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) Console proxy session max: Zone level: 50 - Global level: 50
2025-08-22 14:47:54,372 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) Console proxy session timeout: Zone level: 300000 - Global level: 300000
2025-08-22 14:47:54,373 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) Console proxy disable rp filter: Zone level: true - Global level: true
2025-08-22 14:47:54,374 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) Console proxy launch max: Zone level: 10 - Global level: 10
2025-08-22 14:47:54,374 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-7dea5014]) (logid:6c106e9c) 

After changing zone-level values:

2025-08-22 15:03:38,200 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) Configuration values for CPVM in zone 1: 
2025-08-22 15:03:38,201 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) SSL enabled: Zone level: false - Global level: false
2025-08-22 15:03:38,202 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) NoVNC console default: Zone level: false - Global level: true
2025-08-22 15:03:38,203 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) Console proxy service offering: Zone level: null - Global level: null
2025-08-22 15:03:38,205 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) Console proxy standby capacity: Zone level: 5 - Global level: 10
2025-08-22 15:03:38,206 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) Console proxy capacity scan interval: Zone level: 30000 - Global level: 30000
2025-08-22 15:03:38,207 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) Console proxy command port: Zone level: 8010 - Global level: 8001
2025-08-22 15:03:38,208 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) Console proxy restart: Zone level: false - Global level: true
2025-08-22 15:03:38,209 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) Console proxy URL domain: Zone level: shapeblue.com - Global level: 
2025-08-22 15:03:38,209 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) Console proxy session max: Zone level: 35 - Global level: 50
2025-08-22 15:03:38,210 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) Console proxy session timeout: Zone level: 100000 - Global level: 300000
2025-08-22 15:03:38,211 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) Console proxy disable rp filter: Zone level: false - Global level: true
2025-08-22 15:03:38,212 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) Console proxy launch max: Zone level: 5 - Global level: 10
2025-08-22 15:03:38,212 DEBUG [c.c.c.ConsoleProxyManagerImpl] (consoleproxy-1:[ctx-56bf2911]) (logid:0c7de63d) 

Testing console proxy service offering value by:

  • Changing value at zone level and deploying a CPVM without restart picks a new one
  • remove the existing default offering for cpvm such that there are no more offerings - and observe on recreation it creates a new one (as expected)

How did you try to break this feature and the system with this change?

Copy link

codecov bot commented Aug 7, 2025

Codecov Report

❌ Patch coverage is 14.03509% with 98 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.35%. Comparing base (f020b5b) to head (7b08fe0).
⚠️ Report is 33 commits behind head on main.

Files with missing lines Patch % Lines
...om/cloud/consoleproxy/ConsoleProxyManagerImpl.java 0.00% 82 Missing ⚠️
...ain/java/com/cloud/consoleproxy/AgentHookBase.java 0.00% 7 Missing ⚠️
...ud/consoleproxy/AgentBasedConsoleProxyManager.java 0.00% 6 Missing ⚠️
...arystorage/PremiumSecondaryStorageManagerImpl.java 0.00% 2 Missing ⚠️
...udstack/consoleproxy/ConsoleAccessManagerImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11415      +/-   ##
============================================
- Coverage     17.35%   17.35%   -0.01%     
- Complexity    15230    15231       +1     
============================================
  Files          5885     5885              
  Lines        525626   526199     +573     
  Branches      64160    64391     +231     
============================================
+ Hits          91217    91302      +85     
- Misses       424112   424598     +486     
- Partials      10297    10299       +2     
Flag Coverage Δ
uitests 3.57% <ø> (-0.06%) ⬇️
unittests 18.39% <14.03%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14702

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

good change, some remarks though

@Pearl1594 Pearl1594 changed the title [WIP] Move console proxy related global settings to Zone level Move console proxy related global settings to Zone level Aug 22, 2025
@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
5.7% Coverage on New Code (required ≥ 40%)

See analysis details on SonarQube Cloud

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14710

@Pearl1594
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@Pearl1594 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian Build Failed (tid-14112)

@Pearl1594
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@Pearl1594 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-14120)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 50983 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11415-t14120-kvm-ol8.zip
Smoke tests completed. 146 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@rosi-shapeblue rosi-shapeblue self-assigned this Sep 1, 2025
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.

4 participants