DNS auto-registration on shared networks fires on VM deploy and NIC attach, but not on start of an existing stopped VM
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 72/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Bereich
- cloud, infrastructure, networking
Rechercherichtung
Read DnsProviderManagerImpl and UserVmManagerImpl, starting with the vm.lifecycle.state subscriber and publishVmLifecycleMessageBus call paths. Run test_dns_framework_powerdns.py and add coverage for starting an existing stopped VM. Done means a Stopped→Running transition registers the expected A/AAAA record while preserving deploy and NIC lifecycle behavior.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
problem
The DNS framework introduced in 4.23.0.0 (PR #12737) auto-registers VM DNS records on shared networks associated with a DNS zone. The registration hook fires when a VM is deployed and when a NIC is attached/detached, but does not fire when an existing stopped VM is simply started via startVirtualMachine — the record never gets created.
versions
- Apache CloudStack 4.23.0.0 (upgraded from 4.22.1.1), KVM
- Shared network with zone associated via associateDnsZoneToNetwork
- PowerDNS auth 4.9 as provider (API integration)
The steps to reproduce the bug
- Associate a DNS zone with a shared network
- Deploy a VM on it → record created (works)
- Stop the VM, delete the resulting record
- Start the VM with startVirtualMachine
- No DNS record created; nic_dns_view.nic_dns_name stays NULL for that NIC
Note: If there is an existing shared network with existing VM nics attached before the DNS framework was installed/configured for auto-registration, existing VM will also not auto register its IP, but new VM does.
What to do about it?
Expected
Starting an existing stopped VM on a network with an associated zone should register its A/AAAA record, same as fresh deploy.
Actual
No record. VM starts fine, gets DHCP IP, DNS registration silently skipped.
Root cause (from source, 4.23.0.0)
The subscriber in DnsProviderManagerImpl is wired to vm.lifecycle.state and handles case Running: handleVmCreateEvent(...) for any transition — intent is clearly to cover start of existing VMs. But the publisher UserVmManagerImpl.publishVmLifecycleMessageBus(...) is only called from the fresh-deploy path and the destroy path. A plain start of an existing Stopped VM never publishes, so the subscriber never fires.
Verified workaround
NIC detach + re-attach fires NIC lifecycle events (handleNicPlug) and registers the record correctly — registration logic is healthy, only the start trigger is missing.
Additional observations
- Smoke test test_dns_framework_powerdns.py covers API CRUD only; zero coverage for VM auto-registration (any path) — which is why this ships unnoticed.
- Fix directions: publish VM_LIFECYCLE_STATE from the generic Stopped→Running transition, or subscribe to vm.powerstate.
- Vorherrschende Sprache
- Java
- Sterne
- 3.1k
- Forks
- 1.4k
- Ø Merge
- 6 T. 8 Std.
- Gemergte PRs (30 T.)
- 20
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus apache/cloudstack
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
apache/cloudstack#14248 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
apache/cloudstack#14244 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
apache/cloudstack#14222 ·
Maintainer antworten meist innerhalb von 1 Tag
-
create-kubernetes-binaries-iso.sh builds the ISO without setting a volume ID on EL8 based os'sOffenbug component:kubernetes
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
apache/cloudstack#14180 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug component:projects component:UI
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
apache/cloudstack#14070 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in apache/cloudstack
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
liquid-java/liquidjava#321 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
rename config parameterOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
OpenConext/OpenConext-access#1015 ·
Maintainer antworten meist innerhalb von 1 Tag
-
68000: FDBcc branch target is 2 bytes too low (uses inst_start+2 instead of the displacement word)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
NationalSecurityAgency/ghidra#9702 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
apache/rocketmq-dashboard#5358 ·
Maintainer antworten meist innerhalb von 3 Tagen