Skip to content

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

Open
weizhouapache wants to merge 9 commits into
apache:mainfrom
weizhouapache:4.23-fix-smoke-test-failures
Open

weizhouapache wants to merge 9 commits into
apache:mainfrom
weizhouapache:4.23-fix-smoke-test-failures

Conversation

@weizhouapache

Copy link
Copy Markdown
Member

Description

This PR fixes some smoke test failures on vmware or xenserver/xcpng

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

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

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

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.

Comment thread test/integration/smoke/test_nonstrict_affinity_group.py
Comment thread test/integration/smoke/test_nonstrict_affinity_group.py
Comment thread test/integration/smoke/test_events_resource.py Outdated
@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 3.71%. Comparing base (5812290) to head (f947c85).

❗ There is a different number of reports uploaded between BASE (5812290) and HEAD (f947c85). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (5812290) HEAD (f947c85)
unittests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##               main   #13628       +/-   ##
=============================================
- Coverage     19.90%    3.71%   -16.20%     
=============================================
  Files          6372      487     -5885     
  Lines        577180    41992   -535188     
  Branches      70693     7942    -62751     
=============================================
- Hits         114869     1558   -113311     
+ Misses       449755    40208   -409547     
+ Partials      12556      226    -12330     
Flag Coverage Δ
uitests 3.71% <ø> (ø)
unittests ?

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.

Comment thread test/integration/smoke/test_network_extension_namespace.py
Comment thread test/integration/smoke/test_kms_lifecycle.py
Comment thread test/integration/smoke/test_events_resource.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 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)

@DaanHoogland DaanHoogland moved this from Backlog to In review in CloudStack Testing Sep 1, 2026
@weizhouapache weizhouapache modified the milestones: 4.23.0, 24.0.0 Sep 1, 2026
Copilot AI review requested due to automatic review settings September 17, 2026 14:40
@weizhouapache
weizhouapache force-pushed the 4.23-fix-smoke-test-failures branch from 2addfa1 to f947c85 Compare September 17, 2026 14:40
@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.

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.

🔵 Needs a closer look

A class setup path in test_usage.py can still crash with an IndexError/TypeError by indexing the first element of a possibly empty/None PublicIPAddress.list() result.

Review details

Suppressed comments (3)

test/integration/smoke/test_usage.py:1756

  • PublicIPAddress.list(...) can return None or an empty list; indexing src_nat_list[0] will then raise TypeError/IndexError and fail class setup. Add an explicit guard (and a clear failure message) before selecting the first element.
            issourcenat=True
        )
        cls.public_ip = src_nat_list[0]

test/integration/smoke/test_network_extension_namespace.py:863

  • skipTest() already raises unittest.SkipTest; using raise self.skipTest(...) is redundant and can be confusing (and would become a TypeError if skipTest were ever refactored to return an exception). Call self.skipTest(...) directly.
        if self.hv.lower() != 'kvm':
            raise self.skipTest("Skipping test case for non-kvm hypervisor")

test/integration/smoke/test_kms_lifecycle.py:430

  • skipTest() already raises unittest.SkipTest; using raise self.skipTest(...) is redundant and can be confusing. Call self.skipTest(...) directly.
        if self.hypervisor.lower() != 'kvm':
            raise self.skipTest("Skipping test case for non-kvm hypervisor")
  • Files reviewed: 11/11 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan test matrix

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins matrix job (ol8 mgmt + kvm-ol8, ubuntu22 mgmt + kvm-ubuntu22, ol8 mgmt + vmware-70u3, ol9 mgmt + xcpng82) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-17017)

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan test ol9 xcpng82

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17018)
Environment: xcpng82 (x2), zone: Advanced Networking with Mgmt server ol9
Total time taken: 92929 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13628-t17018-xcpng82.zip
Smoke tests completed. 155 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_11_destroy_vm_and_volumes Error 34.16 test_vm_life_cycle.py

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17016)
Environment: vmware-70u3 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 131950 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13628-t17016-vmware-70u3.zip
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_01_deploy_vm_on_specific_host Error 23.81 test_vm_deployment_planner.py
test_02_deploy_vm_on_specific_cluster Error 3606.01 test_vm_deployment_planner.py
test_03_deploy_vm_on_specific_pod Error 24.85 test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_cluster Error 3603.03 test_vm_deployment_planner.py
test_05_deploy_vm_on_cluster_override_pod Error 4.38 test_vm_deployment_planner.py
test_09_expunge_vm Failure 427.87 test_vm_life_cycle.py
test_01_migrate_vm_strict_tags_success Error 3608.56 test_vm_strict_host_tags.py
test_02_migrate_vm_strict_tags_failure Error 20.28 test_vm_strict_host_tags.py
test_01_restore_vm_strict_tags_success Error 3605.24 test_vm_strict_host_tags.py
test_02_restore_vm_strict_tags_failure Error 4.91 test_vm_strict_host_tags.py
test_01_scale_vm_strict_tags_success Error 20.09 test_vm_strict_host_tags.py
test_02_scale_vm_strict_tags_failure Error 3608.11 test_vm_strict_host_tags.py
test_01_deploy_vm_on_specific_host_without_strict_tags Error 26.24 test_vm_strict_host_tags.py
test_02_deploy_vm_on_any_host_without_strict_tags Error 7207.20 test_vm_strict_host_tags.py
test_03_deploy_vm_on_specific_host_with_strict_tags_success Error 3606.29 test_vm_strict_host_tags.py
test_04_deploy_vm_on_any_host_with_strict_tags_success Error 5.81 test_vm_strict_host_tags.py

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

6 participants