From 3a0c98cbcf526ce9e0052b9117202718bacd94ea Mon Sep 17 00:00:00 2001 From: waterWang Date: Tue, 25 Aug 2026 19:10:52 +0800 Subject: [PATCH] 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 apache/cloudstack#13966. --- .../cloudstack/engine/orchestration/NetworkOrchestrator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index 84a397349cec..d013dc63c85b 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -1603,8 +1603,9 @@ private void setupPersistentNetwork(NetworkVO network, NetworkOfferingVO offerin } private boolean networkMeetsPersistenceCriteria(NetworkVO network, NetworkOfferingVO offering, boolean cleanup) { + BroadcastDomainType broadcastDomainType = network.getBroadcastUri() != null ? BroadcastDomainType.getSchemeValue(network.getBroadcastUri()) : null; boolean criteriaMet = offering.isPersistent() && - (network.getBroadcastUri() != null && BroadcastDomainType.getSchemeValue(network.getBroadcastUri()) == BroadcastDomainType.Vlan); + (broadcastDomainType == BroadcastDomainType.Vlan || broadcastDomainType == BroadcastDomainType.Vxlan); if (!cleanup) { return criteriaMet && network.getGuestType() == GuestType.L2; } else {