Skip to content

Commit 3a0c98c

Browse files
committed
fix: include VXLAN persistent networks in cleanup resource dispatch
cleanupPersistentnNetworkResources() only sent CleanupPersistentNetworkResourceCommand for networks whose broadcast URI scheme is vlan, so vxlan:// persistent networks leaked bridges and VXLAN interfaces on hosts that never ran a VM on them. setupPersistentNetwork() creates resources for all persistent networks with no scheme filter, so the removal path must accept both Vlan and Vxlan schemes. Fixes #13966.
1 parent 158fe4f commit 3a0c98c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1603,8 +1603,9 @@ private void setupPersistentNetwork(NetworkVO network, NetworkOfferingVO offerin
16031603
}
16041604

16051605
private boolean networkMeetsPersistenceCriteria(NetworkVO network, NetworkOfferingVO offering, boolean cleanup) {
1606+
BroadcastDomainType broadcastDomainType = network.getBroadcastUri() != null ? BroadcastDomainType.getSchemeValue(network.getBroadcastUri()) : null;
16061607
boolean criteriaMet = offering.isPersistent() &&
1607-
(network.getBroadcastUri() != null && BroadcastDomainType.getSchemeValue(network.getBroadcastUri()) == BroadcastDomainType.Vlan);
1608+
(broadcastDomainType == BroadcastDomainType.Vlan || broadcastDomainType == BroadcastDomainType.Vxlan);
16081609
if (!cleanup) {
16091610
return criteriaMet && network.getGuestType() == GuestType.L2;
16101611
} else {

0 commit comments

Comments
 (0)