Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

VXLAN persistent networks create bridges on hosts that never ran a VM on them, but don't clean them up

Aperta
#13,966 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java

Direzione di ricerca

Inizia con NetworkOrchestrator.cleanupPersistentnNetworkResources() e networkMeetsPersistenceCriteria(), quindi confrontali con DefaultHostListener.setupPersistentNetwork() e hostAboutToBeRemoved(). Riproduci il flusso di eliminazione di una rete VXLAN persistente su tre o più host e controlla management-server.log e /sys/class/net/brvx-*; il lavoro è completato quando viene inviato cleanup e i bridge e le interfacce VXLAN scompaiono da ogni host.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
problem

With a persistent network offering, CloudStack builds the network's bridge on every host in the zone. But when the network is deleted it only cleans the bridge up on hosts that actually ran a VM on it. On every other host, the bridge and its VXLAN interface stay behind forever.

Investigation
There is a difference between the filters when creating a persistent network, and removing a persistent network.
Creation:
DefaultHostListener.setupPersistentNetwork() creates the bridges on hostConnect/hostEnabled for all networks from getAllPersistentNetworksFromZone() - no isolation-method filter.
Removal:
NetworkOrchestrator.cleanupPersistentnNetworkResources() is gated by networkMeetsPersistenceCriteria(), which requires the broadcast URI scheme to be Vlan, so for vxlan:// networks CleanupPersistentNetworkResourceCommand is never sent. (hostAboutToBeRemoved() sends the same cleanup with no scheme check either - the VLAN-only gate exists only on the network-delete path.)

Hosts that ran a VM on the network are cleaned up via the normal VM-lifecycle teardown, so the leak only affects uninvolved hosts.

versions

4.22.1.1, KVM, advanced zone with VXLAN isolation, persistent network offerings.

The steps to reproduce the bug
  1. Advanced zone, KVM, VXLAN isolation, 3+ hosts.
  2. Create a VPC with two tiers on a persistent offering.
  3. Start VMs so they land on only some hosts. (Restarting cloudstack-agent on an uninvolved host also creates the bridges there via hostConnect.)
  4. Delete the tiers, then the VPC.
  5. ls -d /sys/class/net/brvx-* on each host.

Expected behaviour:
The bridge and VXLAN interface are removed from every host in the zone.

Actual behaviour:
The VNI is still present on hosts that never ran a VM on the network; CleanupPersistentNetworkResourceCommand never appears in management-server.log during the delete.

What to do about it?

Accept Vxlan alongside Vlan in networkMeetsPersistenceCriteria(), or drop the scheme check to match the setup path.

Lingua principale
Java
Stelle
3.1k
Fork
1.4k
Merge medio
6g 20h
PR unite (30g)
27

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/cloudstack

Tutte le issue di apache/cloudstack

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.