Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

DNS auto-registration on shared networks fires on VM deploy and NIC attach, but not on start of an existing stopped VM

Abierto
#14,197 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
java, python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug
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
  1. Associate a DNS zone with a shared network
  2. Deploy a VM on it → record created (works)
  3. Stop the VM, delete the resulting record
  4. Start the VM with startVirtualMachine
  5. 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.
Lenguaje dominante
Java
Estrellas
3.1k
Forks
1.4k
Merge medio
6 d 20 h
PR fusionados (30 d)
27

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/cloudstack

Todos los issues de apache/cloudstack

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.