DNS auto-registration on shared networks fires on VM deploy and NIC attach, but not on start of an existing stopped VM
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- cloud, infrastructure, networking
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.4k
- Merge trung bình
- 6 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 27
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/cloudstack
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/cloudstack#14222 ·
-
create-kubernetes-binaries-iso.sh builds the ISO without setting a volume ID on EL8 based os's Đang mởbug component:kubernetes
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
apache/cloudstack#14180 ·
-
bug component:projects component:UI
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
apache/cloudstack#14070 · 5 bình luận ·
-
component:backup
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
apache/cloudstack#14013 ·
-
KVM agent fails to connect to Ceph RBD storage pool after upgrading Ceph client to Tentacle 20.2.4 Đang mởbug component:ceph
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/cloudstack#13989 · 3 bình luận ·
Tất cả issue của apache/cloudstack
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Đang mởbug frontend maui-pilot
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
objectionary/eo-graphs#74 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100