Skip to content

Conversation

@DaanHoogland
Copy link
Contributor

@DaanHoogland DaanHoogland commented Oct 30, 2025

Description

This PR…
Fixes: #9026 , but shows that there is a genuine issue in the vlan allocation management in the system.

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?

@boring-cyborg boring-cyborg bot added component:integration-test Python Warning... Python code Ahead! labels Oct 30, 2025
@DaanHoogland DaanHoogland added this to the 4.20.3 milestone Oct 30, 2025
Copy link
Contributor

Copilot AI left a comment

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 refactors the test cleanup mechanism in test_migration.py to leverage the parent class's cleanup functionality. The changes move from a custom cleanup implementation to using the standard super() pattern inherited from cloudstackTestCase.

Key changes:

  • Appending resources to cleanup lists immediately after creation instead of in bulk at the end
  • Delegating cleanup to parent class methods via super() calls
  • Initializing self.cleanup list at the beginning of setUp() method

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

zoneid=self.zone.id
)
self.cleanup.append(deployVmResponse)

Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

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

[nitpick] There's an extra blank line added after appending deployVmResponse to the cleanup list (line 215), but no blank line after other similar append operations (e.g., lines 194, 255, 271). For consistency, either remove this blank line or add blank lines after all similar operations throughout the file.

Suggested change

Copilot uses AI. Check for mistakes.
domainid=self.account.domainid
)
self.cleanup.append(vpc)

Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Similar to the previous comment, there's an extra blank line after appending vpc to the cleanup list. This inconsistency in spacing should be addressed to maintain uniform code style throughout the file.

Suggested change

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 10.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.17%. Comparing base (e4414d1) to head (f7fdaf8).

Files with missing lines Patch % Lines
...n/java/com/cloud/dc/dao/DataCenterVnetDaoImpl.java 0.00% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #11945      +/-   ##
============================================
- Coverage     16.18%   16.17%   -0.01%     
+ Complexity    13300    13298       -2     
============================================
  Files          5657     5657              
  Lines        498478   498488      +10     
  Branches      60501    60501              
============================================
- Hits          80668    80649      -19     
- Misses       408827   408862      +35     
+ Partials       8983     8977       -6     
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 17.03% <10.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
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

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

clgtm

@DaanHoogland
Copy link
Contributor Author

unfortunately test-a-TestNetworkMigration-test_01_native_to_native_network_migration-###### is still created and destroyed but a vlan is still allocated to it.

@DaanHoogland
Copy link
Contributor Author

unfortunately test-a-TestNetworkMigration-test_01_native_to_native_network_migration-###### is still created and destroyed but a vlan is still allocated to it.

The problem seems to be not in the test but in vlan allocation leakage in the system. This can be merged but the left over from the test will remain, the scenario is valid.

Copy link
Collaborator

@sudo87 sudo87 left a comment

Choose a reason for hiding this comment

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

clgtm

@DaanHoogland DaanHoogland reopened this Nov 3, 2025
@DaanHoogland
Copy link
Contributor Author

DaanHoogland commented Nov 3, 2025

As this is purely (test)cleanup, I don’t think this needs further testing , agree @vishesh92 @sudo87 @Pearl1594 ?

@vishesh92
Copy link
Member

As this is purely (test)cleanup, I don’t think this needs further testing , agree @vishesh92 @sudo87 @Pearl1594 ?

Yes. Just need to wait for test results to ensure that teardown gets executed successfully.

@DaanHoogland
Copy link
Contributor Author

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

I don’t think there is much relevance in this, rerunning.

@DaanHoogland DaanHoogland marked this pull request as draft November 6, 2025 12:04
@DaanHoogland DaanHoogland force-pushed the ghi9026-testNetworkMigrationCleanup branch from a080eb8 to 74235ec Compare November 13, 2025 15:26
@DaanHoogland
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland 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 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15755

@apache apache deleted a comment from blueorangutan Nov 13, 2025
@apache apache deleted a comment from blueorangutan Nov 13, 2025
@apache apache deleted a comment from blueorangutan Nov 13, 2025
@apache apache deleted a comment from blueorangutan Nov 13, 2025
@apache apache deleted a comment from blueorangutan Nov 13, 2025
@apache apache deleted a comment from blueorangutan Nov 13, 2025
@apache apache deleted a comment from blueorangutan Nov 13, 2025
@apache apache deleted a comment from blueorangutan Nov 13, 2025
@apache apache deleted a comment from blueorangutan Nov 13, 2025
@apache apache deleted a comment from blueorangutan Dec 8, 2025
@apache apache deleted a comment from blueorangutan Dec 8, 2025
@DaanHoogland DaanHoogland force-pushed the ghi9026-testNetworkMigrationCleanup branch from 74235ec to f7fdaf8 Compare December 8, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:integration-test Python Warning... Python code Ahead!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

after TestNetworkMigration a vlan is still allocated to a deleted network

4 participants