Skip to content

test: fix smoke test failures on xen/vmware - #13628

Merged
weizhouapache merged 9 commits into
apache:mainfrom
weizhouapache:4.23-fix-smoke-test-failures
Oct 23, 2026
Merged

weizhouapache merged 9 commits into
apache:mainfrom
weizhouapache:4.23-fix-smoke-test-failures

Conversation

@weizhouapache

@weizhouapache weizhouapache commented Jul 16, 2026 •

Copy link
Copy Markdown
Member

Description

This PR fixes smoke test failures on VMware and XenServer/XCP-ng. Changes:

Test fixes

  • test_cluster_drs.py: only migrate system VMs and routers that are Running, and skip a migration that fails because the VM left Running state, instead of failing class setup.
  • test_deploy_vms_in_parallel.py: delete the account first, then retry the domain deletion while the account cleanup task finishes. Give up after 15 retries and leave the domain for later cleanup.
  • test_host_maintenance.py: skip the test when a host enters ErrorInPrepareForMaintenance or ErrorInMaintenance, which usually means CPUs are incompatible. Recover hosts in maintenance-related error states with cancel-maintenance before re-enabling them.
  • test_kms_lifecycle.py and test_network_extension_namespace.py: skip on non-KVM hypervisors, and check for ip, arping, dnsmasq and haproxy on KVM hosts.
  • test_usage.py: fix the public IP creation arguments.
  • test_events_resource.py, test_nonstrict_affinity_group.py, test_usage.py, test_vm_life_cycle.py, test_vm_strict_host_tags.py: add short sleeps (10 seconds) before volume attach, migration and similar steps, so the VM is ready.

VMware

  • VmwareClient.java: call sc.init(...) before reading the server session context in trustAllHttpsCertificates.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Test (unit or integration test code)

Copilot AI lite review requested due to automatic review settings July 16, 2026 11:34
@boring-cyborg boring-cyborg Bot added component:integration-test Python Warning... Python code Ahead! labels Jul 16, 2026
@weizhouapache weizhouapache added this to the 4.23.0 milestone Jul 16, 2026
@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@weizhouapache weizhouapache added this to the 4.23.0 milestone Jul 16, 2026

Copilot AI 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.

Pull request overview

This PR targets integration smoke test stability across hypervisors (notably XenServer/XCP-ng and VMware) by skipping KVM-specific checks/tests when not running on KVM, and by adjusting a few timing/host prerequisite assumptions that can cause intermittent failures.

Changes:

  • Skip KVM-only paths in smoke tests when the detected hypervisor is not KVM.
  • Add additional host-tool prerequisite checks for a VPC source NAT IP update test.
  • Add delays around affinity-group migration steps and make the events-resource test more tolerant around volume attach/detach operations.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
test/integration/smoke/test_nonstrict_affinity_group.py Adds waits before migration steps in non-strict affinity group tests.
test/integration/smoke/test_network_extension_namespace.py Skips KVM prerequisite checks on non-KVM hypervisors; expands required host tools for one test.
test/integration/smoke/test_kms_lifecycle.py Skips a VM root-disk encryption test on non-KVM hypervisors.
test/integration/smoke/test_events_resource.py Wraps volume attach/detach operations to avoid hard failures in some environments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jul 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 19.90%. Comparing base (5812290) to head (f947c85).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #13628   +/-   ##
=========================================
  Coverage     19.90%   19.90%           
- Complexity    20171    20177    +6     
=========================================
  Files          6372     6372           
  Lines        577180   577180           
  Branches      70693    70693           
=========================================
+ Hits         114869   114910   +41     
+ Misses       449755   449702   -53     
- Partials      12556    12568   +12     
Flag Coverage Δ
uitests 3.71% <ø> (ø)
unittests 21.17% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan test ubuntu26 xcpng82 keepEnv

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

weizhouapache commented Jul 16, 2026 •

Copy link
Copy Markdown
Member Author

@blueorangutan test ubuntu26 vmware-80u3e keepEnv

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins test job (ubuntu26 mgmt + vmware-80u3e) has been kicked to run smoke tests

Copilot AI review requested due to automatic review settings July 17, 2026 09:41

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with no 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 18602

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan test ubuntu26 xcpng82

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan test ubuntu26 vmware-80u3e

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins test job (ubuntu26 mgmt + vmware-80u3e) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-7)

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan test ubuntu26 vmware-80u3

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins test job (ubuntu26 mgmt + vmware-80u3) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-9)

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-55)

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with no 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 19357

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan test ubuntu26 vmware-70u3

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins test job (ubuntu26 mgmt + vmware-70u3) has been kicked to run smoke tests

@blueorangutan

blueorangutan commented Oct 1, 2026 •

Copy link
Copy Markdown

[SF] Trillian test result (tid-56)
Environment: vmware-70u3 (x2), zone: Advanced Networking with Mgmt server u26
Total time taken: 69822 seconds
Marvin logs: [archive removed]
Smoke tests completed. 153 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_13_test_add_external_nodes_to_cluster Error 831.30 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 920.38 test_kubernetes_clusters.py
test_05_list_volumes_isrecursive Failure 0.06 test_list_volumes.py
test_07_list_volumes_listall Failure 0.06 test_list_volumes.py
test_08_migrate_vm Error 29.32 test_vm_life_cycle.py

@blueorangutan

blueorangutan commented Oct 3, 2026 •

Copy link
Copy Markdown

[SF] Trillian test result (tid-57)
Environment: vmware-70u3 (x2), zone: Advanced Networking with Mgmt server u26
Total time taken: 101910 seconds
Marvin logs: [archive removed]
Smoke tests completed. 152 look OK, 3 have errors, 1 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_08_upgrade_kubernetes_ha_cluster Failure 3689.65 test_kubernetes_clusters.py
test_13_test_add_external_nodes_to_cluster Error 834.28 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 910.87 test_kubernetes_clusters.py
test_01_deploy_vm_on_specific_host Error 3603.93 test_vm_deployment_planner.py
test_02_deploy_vm_on_specific_cluster Error 2.48 test_vm_deployment_planner.py
test_03_deploy_vm_on_specific_pod Error 2.56 test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_cluster Error 1.43 test_vm_deployment_planner.py
test_05_deploy_vm_on_cluster_override_pod Error 2.49 test_vm_deployment_planner.py
test_09_expunge_vm Failure 423.76 test_vm_life_cycle.py
all_test_vm_strict_host_tags Skipped --- test_vm_strict_host_tags.py

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with no 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 19673

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan test ol8 vmware-70u3

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan test ol8 xcpng82

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

blueorangutan commented Oct 23, 2026 •

Copy link
Copy Markdown

[SF] Trillian test result (tid-17210)
Environment: vmware-70u3 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 85281 seconds
Marvin logs: [archive removed]
Smoke tests completed. 155 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_08_upgrade_kubernetes_ha_cluster Failure 3706.60 test_kubernetes_clusters.py
test_05_list_volumes_isrecursive Failure 0.06 test_list_volumes.py
test_07_list_volumes_listall Failure 0.05 test_list_volumes.py

@weizhouapache

Copy link
Copy Markdown
Member Author

@nvazquez @RosiKyu
there are some intermittent failures on vmware and xcpng. most of the test failures are gone.
do you think we can merge this PR to 24.0 ?

@nvazquez

Copy link
Copy Markdown
Contributor

Thanks @weizhouapache, looks good to me

@weizhouapache

Copy link
Copy Markdown
Member Author

thanks @nvazquez @DaanHoogland
I am merging . If there are new failures, we could address in another PR

@weizhouapache
weizhouapache merged commit 1b4f19e into apache:main Oct 23, 2026
26 of 28 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in CloudStack Testing Oct 23, 2026
@weizhouapache
weizhouapache deleted the 4.23-fix-smoke-test-failures branch October 23, 2026 14:48
@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17212)
Environment: xcpng82 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 98653 seconds
Marvin logs: not retained - PR was already closed when the run finished
Smoke tests completed. 154 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_04_readiness_cache_invalidated_on_out_of_band_restart Error 171.29 test_instance_boot_group.py
test_08_upgrade_kubernetes_ha_cluster Failure 3736.13 test_kubernetes_clusters.py
test_change_service_offering_for_vm_with_snapshots Failure 1023.27 test_vm_snapshots.py

weizhouapache added a commit to weizhouapache/cloudstack that referenced this pull request Oct 28, 2026
* test: fix smoke test failures on xen/vmware

* test: sleep 10 seconds before attaching volume in test_events_resource.py

* test: add more time.sleep(10)

* test: add more time.sleep(10) in test_vm_strict_host_tags.py

* test: fix test_usage.py

* test: move time.sleep(10) in test_host_maintenance.py

* VMware: fix import DC

* test: retry domain deletion in tearDown of test_deploy_vms_in_parallel.py

* test: fix tests failures caused by others in drs and host maintenance
weizhouapache added a commit to weizhouapache/cloudstack that referenced this pull request Nov 26, 2026
Backport of the applicable changes of apache#13628:
- add sleeps and retries in tests that are sensitive to timing on xen and vmware
- retry the domain deletion in tearDown of test_deploy_vms_in_parallel
- avoid failures caused by other tests in test_cluster_drs and test_host_maintenance
- fix test_usage
- VMware: fix import DC

(cherry picked from commit 1b4f19e)
sureshanaparti pushed a commit that referenced this pull request Nov 28, 2026
Backport of the applicable test changes of #13628:
- add sleeps and retries in tests that are sensitive to timing on xen and vmware
- retry the domain deletion in tearDown of test_deploy_vms_in_parallel
- avoid failures caused by other tests in test_cluster_drs and test_host_maintenance
- fix test_usage

(cherry picked from commit 1b4f19e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

5 participants