VMware: wait for NSX DV port group readiness - #13753
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
|
| } else if (BroadcastDomainType.NSX == broadcastDomainType && Objects.nonNull(netName)){ | ||
| networkName = netName; | ||
| bWaitPortGroupReady = false; | ||
| // NSX creates the segment outside vCenter, where its backing DV port group may not be immediately visible. |
There was a problem hiding this comment.
I don’t think we need this comment, but soit.
| // NSX creates the segment outside vCenter, where its backing DV port group may not be immediately visible. |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #13753 +/- ##
=============================================
- Coverage 17.69% 3.69% -14.01%
=============================================
Files 5925 449 -5476
Lines 533534 38176 -495358
Branches 65273 7072 -58201
=============================================
- Hits 94421 1409 -93012
+ Misses 428434 36580 -391854
+ Partials 10679 187 -10492
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
This PR prevents VMware NSX-backed guest network implementation from failing when vCenter has not yet exposed the backing distributed virtual port group immediately after NSX segment creation.
The NSX branch in
HypervisorHostHelper.prepareNetworknow uses the existing boundedwaitForDvPortGroupReadypath. The change does not retry the CloudStack mutation or create a second network; it only waits for vCenter inventory visibility before returning the already-created port group.A regression test simulates an empty first vCenter lookup followed by the port group becoming available. The existing immediate-availability behavior remains covered.
Fixes: #13752
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
Not applicable.
How Has This Been Tested?
Targeted regression and baseline tests were run on the
4.22branch with Java 17:The Maven reactor built all 18 required modules successfully, including
cloud-vmware-base, with zero Checkstyle violations.How did you try to break this feature and the system with this change?
The regression test makes the first vCenter DV port group query return no result and the second return the expected port group. The pre-existing immediate-availability test also runs to verify the normal fast path remains unchanged. The production path remains bounded by the existing readiness timeout and returns failure if the port group never appears.