DNS auto-registration on shared networks fires on VM deploy and NIC attach, but not on start of an existing stopped VM
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 72/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Domínio
- cloud, infrastructure, networking
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Java
- Estrelas
- 3.1k
- Forks
- 1.4k
- Merge médio
- 6d 11h
- PRs com merge (30d)
- 13
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de apache/cloudstack
-
listPublicIpAddresses NullPointerException on shared networks with a VR (4.22)Talvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
apache/cloudstack#14248 ·
Mantenedores costumam responder em até 1 dia
-
CKS: upgradeKubernetesCluster fails on control node when binaries ISO ships headlamp.yaml instead of dashboard.yamlTalvez já em andamento @mw-0 assumiu há 10 dias. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
apache/cloudstack#14244 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Resize volume API validation errors are not displayed in the UITalvez já em andamento @sathvikaragi assumiu há 13 dias. Abertabug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
apache/cloudstack#14222 ·
Mantenedores costumam responder em até 1 dia
-
create-kubernetes-binaries-iso.sh builds the ISO without setting a volume ID on EL8 based os'sAbertabug component:kubernetes
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
apache/cloudstack#14180 ·
Mantenedores costumam responder em até 1 dia
-
bug component:projects component:UI
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
apache/cloudstack#14070 · 5 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de apache/cloudstack
Issues semelhantes
-
new feature
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/rocketmq-dashboard#5594 ·
Mantenedores costumam responder em até 3 dias
-
bug pkg:sdk
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
aws/aws-durable-execution-sdk-java#773 ·
Mantenedores costumam responder em até 1 dia
-
[C#]:主页联网更新的提示投稿横幅指向错误Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
PCL-Community/PCL-CE#3652 ·
Mantenedores costumam responder em até 1 dia
-
TaskSecret.vue: replace explicit `any` with real typesTalvez já em andamento @prayas-bit assumiu hoje. Abertaarea/frontend good first issue kind/cooldown
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
kestra-io/kestra#20352 · 1 comentário ·
Mantenedores costumam responder em até 1 dia