waterWang opened a new pull request, #13968:
URL: https://github.com/apache/cloudstack/pull/13968
### Description
Fixes #13966
`cleanupPersistentnNetworkResources()` only sent
`CleanupPersistentNetworkResourceCommand` for networks whose broadcast URI
scheme was `vlan`. For `vxlan://` persistent networks the cleanup command was
never dispatched, so bridges and VXLAN interfaces were left behind on every
host that never ran a VM on the network.
`setupPersistentNetwork()` in `DefaultHostListener` creates resources for
**all** persistent networks from `getAllPersistentNetworksFromZone()` with no
isolation-method filter, so the removal path must accept both `Vlan` and
`Vxlan` schemes to stay symmetric.
### Changes
- `engine/orchestration/.../NetworkOrchestrator.java`:
`networkMeetsPersistenceCriteria()` now accepts both `BroadcastDomainType.Vlan`
and `BroadcastDomainType.Vxlan` broadcast URI schemes (extracted to a local
`broadcastDomainType` variable for null-safety and readability).
### Testing
- Code-level change only; the condition now matches the persistence criteria
used at creation time for VXLAN networks. Verified the broadcast scheme enum
values (`Vlan("vlan", Integer.class)`, `Vxlan("vxlan", Long.class)` in
`Networks.java`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]