Skip to content

Fix the validation of CPVMs states in multiple zones#13021

Merged
DaanHoogland merged 2 commits into
apache:4.20from
scclouds:validate-cpvm-state-in-multiple-zones
May 27, 2026
Merged

Fix the validation of CPVMs states in multiple zones#13021
DaanHoogland merged 2 commits into
apache:4.20from
scclouds:validate-cpvm-state-in-multiple-zones

Conversation

@Tonitzpp
Copy link
Copy Markdown
Contributor

@Tonitzpp Tonitzpp commented Apr 14, 2026

Description

Currently, during the deployment of CPVMs, CloudStack validates whether there are already CPVMs in the Starting or Stopping state in the environment, in order to avoid duplicate provisioning. However, this operation does not filter for zones. Therefore, if there is more than one zone in the environment, and in one of these zones there is a CPVM in one of these states, the CPVMs of other zones will not be created.

Changes were made to consider only the zone in which the CPVM will be created.

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

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

In an environment with two configured zones, zn-01 and zn-02, I started the zn-01 and waited for its system VMs to start while zone zn-02 was deactivated. After the system VMs in zone zn-01 were in the Running state, I changed their states to Starting in the database and activated zone zn-02. I went to the system VMs tab and observed that the system VMs in zn-02 were being created while those in zone zn-01 were in the Starting state.

Comment thread server/src/main/java/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.27%. Comparing base (6f1aa96) to head (fd4db5a).
⚠️ Report is 7 commits behind head on 4.20.

Files with missing lines Patch % Lines
...om/cloud/consoleproxy/ConsoleProxyManagerImpl.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #13021   +/-   ##
=========================================
  Coverage     16.26%   16.27%           
- Complexity    13434    13438    +4     
=========================================
  Files          5665     5665           
  Lines        500530   500533    +3     
  Branches      60787    60788    +1     
=========================================
+ Hits          81411    81438   +27     
+ Misses       410028   409990   -38     
- Partials       9091     9105   +14     
Flag Coverage Δ
uitests 4.15% <ø> (ø)
unittests 17.12% <0.00%> (+<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.

Copy link
Copy Markdown
Collaborator

@GaOrtiga GaOrtiga left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
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.

clgtm

…rImpl.java

Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
Copy link
Copy Markdown
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

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

code lgtm

@weizhouapache weizhouapache added this to the 4.20.4 milestone May 7, 2026
@winterhazel
Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@winterhazel 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
Copy Markdown

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

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File
test_CRUD_operations_userdata Error 1521.18 test_register_userdata.py
test_deploy_vm_with_registered_userdata Error 7.26 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_allow Error 7.59 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_append Error 7.42 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_deny Error 7.60 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_params Error 7.66 test_register_userdata.py
test_link_and_unlink_userdata_to_template Error 7.37 test_register_userdata.py
test_user_userdata_crud Error 7.34 test_register_userdata.py
ContextSuite context=TestResetVmOnReboot>:setup Error 0.00 test_reset_vm_on_reboot.py
ContextSuite context=TestRAMCPUResourceAccounting>:setup Error 0.00 test_resource_accounting.py
test_03_register_template Error 1.16 test_resource_names.py
ContextSuite context=TestRestoreVM>:setup Error 0.00 test_restore_vm.py
ContextSuite context=TestRouterDHCPHosts>:setup Error 0.00 test_router_dhcphosts.py
ContextSuite context=TestRouterDHCPOpts>:setup Error 0.00 test_router_dhcphosts.py
test_01_create_volume Failure 609.57 test_volumes.py
test_01_root_volume_encryption Failure 718.79 test_volumes.py
test_02_data_volume_encryption Failure 671.68 test_volumes.py
test_03_root_and_data_volume_encryption Failure 687.45 test_volumes.py
test_02_attach_volume Failure 1271.77 test_volumes.py
test_02_attach_volume Failure 1271.79 test_volumes.py
test_03_download_attached_volume Failure 664.52 test_volumes.py
test_04_delete_attached_volume Failure 670.07 test_volumes.py
test_05_detach_volume Failure 759.66 test_volumes.py
test_06_download_detached_volume Failure 852.07 test_volumes.py
test_07_resize_fail Failure 662.39 test_volumes.py
test_08_resize_volume Failure 673.09 test_volumes.py
test_09_delete_detached_volume Failure 667.31 test_volumes.py
test_10_list_volumes Failure 676.94 test_volumes.py
test_11_attach_volume_with_unstarted_vm Failure 761.51 test_volumes.py
test_12_resize_volume_with_only_size_parameter Failure 678.62 test_volumes.py
test_13_migrate_volume_and_change_offering Failure 810.87 test_volumes.py
test_14_delete_volume_delete_protection Failure 671.33 test_volumes.py
ContextSuite context=TestRouterDns>:setup Error 0.00 test_router_dns.py
test_01_create_vm_snapshots Failure 603.72 test_vm_snapshots.py
test_02_revert_vm_snapshots Failure 600.75 test_vm_snapshots.py
test_03_delete_vm_snapshots Failure 0.02 test_vm_snapshots.py
ContextSuite context=TestRouterDnsService>:setup Error 0.00 test_router_dnsservice.py
ContextSuite context=TestRouterIpTablesPolicies>:setup Error 0.00 test_routers_iptables_default_policy.py
ContextSuite context=TestVPCIpTablesPolicies>:setup Error 0.00 test_routers_iptables_default_policy.py
ContextSuite context=TestIsolatedNetworks>:setup Error 0.00 test_routers_network_ops.py
ContextSuite context=TestRedundantIsolateNetworks>:setup Error 0.00 test_routers_network_ops.py
ContextSuite context=TestRouterServices>:setup Error 0.00 test_routers.py
ContextSuite context=TestCpuCapServiceOfferings>:setup Error 0.00 test_service_offerings.py
ContextSuite context=TestServiceOfferings>:setup Error 0.46 test_service_offerings.py
ContextSuite context=TestSetSourceNatIp>:setup Error 0.00 test_set_sourcenat.py
ContextSuite context=TestSharedFSLifecycle>:setup Error 0.00 test_sharedfs_lifecycle.py
ContextSuite context=TestSnapshotRootDisk>:setup Error 0.00 test_snapshots.py
ContextSuite context=TestSnapshotStandaloneBackup>:setup Error 0.00 test_snapshots.py
test_10_attachAndDetach_iso Failure 671.33 test_vm_life_cycle.py

Copy link
Copy Markdown
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

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

code lgtm

@Tonitzpp
Copy link
Copy Markdown
Contributor Author

@DaanHoogland, Could you run the tests again?

@weizhouapache
Copy link
Copy Markdown
Member

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-16165)

@Tonitzpp
Copy link
Copy Markdown
Contributor Author

@weizhouapache ,Could you run the tests again?

@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File

@DaanHoogland DaanHoogland merged commit b642bbe into apache:4.20 May 27, 2026
25 of 26 checks passed
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.

8 participants