CloudStack DNS framework - Integrate PowerDNS as first plugin#12737
CloudStack DNS framework - Integrate PowerDNS as first plugin#12737sudo87 wants to merge 69 commits into
Conversation
2. added relevant changes in dao and vo 3. worked on creatednszone, integration with mgr 4. powerdns create zone api call
1. creatednszone 2. listdnszone 3. updatednszone 4. deletednszone
1. Add dns server 2. create zone 3. add records 4. verify in powerdns 5. verify using dig
1. Registerdnsrecordforvm api 2. removednsrecordforvm api 3. cleanup; fixed license, dao logic
1. refactored client 2. added exceptions 3. enhanced updateZone 4. ownership check for deleteDnsServer
…n svc and handle dot version in client
…elete events 2. add dnsrecordurl in nic_details table 3. add dnsrecordurl in vm response
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12737 +/- ##
============================================
+ Coverage 18.88% 19.14% +0.25%
- Complexity 18222 18607 +385
============================================
Files 6178 6235 +57
Lines 555397 558566 +3169
Branches 67797 68194 +397
============================================
+ Hits 104871 106918 +2047
- Misses 439005 439995 +990
- Partials 11521 11653 +132
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
[SF] Trillian test result (tid-16269)
|
|
@blueorangutan package |
|
@sudo87 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18211 |
|
[SF] Trillian test result (tid-16275)
|
|
@blueorangutan test |
|
@vladimirpetrov a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-16278)
|
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 130 out of 131 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (6)
server/src/main/java/com/cloud/api/ApiDBUtils.java:1
dnsZoneVOcan be null if the referenced DNS zone was deleted/soft-deleted or the lookup fails, which will cause a NullPointerException atdnsZoneVO.getName(). Add an explicit null-check fordnsZoneVObefore dereferencing (and return(null, null)or a partial pair as appropriate).
server/src/main/java/com/cloud/api/ApiResponseHelper.java:1- This adds at least one extra DB lookup per network response, which can become an N+1 query pattern when listing many networks. Consider fetching DNS zone/subdomain via an existing network join/view (or batch-loading mappings for the set of network IDs) to avoid per-row lookups.
ui/src/components/view/ListView.vue:1 - This template uses
v-if(notv-else-if) and will render in addition to otherv-iftemplates that may also match for the same column, resulting in duplicated cell content. Make this a true fallback (e.g., convert tov-else/v-else-ifin the same chain), or narrow the condition to only keys that have no specialized template.
server/src/main/java/org/apache/cloudstack/dns/dao/DnsZoneNetworkMapDao.java:1 - The
findByZoneIdmethod takes a parameter namednetworkId, which is misleading and increases the chance of accidentally passing the wrong ID type. Rename the parameter todnsZoneId(and keep naming consistent across DAO interfaces/impls) to reduce misuse.
server/src/main/java/org/apache/cloudstack/dns/vo/DnsZoneVO.java:1 getAssociatedNetworks()currently always returns an empty list, which will incorrectly report 'no associations' even whendns_zone_network_mapcontains mappings. Prefer populating this via a transient field set by the manager/query layer, or implement retrieval via the mapping DAO so callers can rely on this contract.
engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql:1- The unique constraint name
uc_dns_zone__uuidis reused fordns_zone_network_map, even though it’s a different table. While this may work (depending on DB/index naming rules), it’s confusing for maintenance and troubleshooting. Consider renaming it to something table-specific (e.g.,uc_dns_zone_network_map__uuid).
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18349 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Description
This PR introduces initial implementation for a plugin based DNS framework in Apache CloudStack. It enables both admin and end-users to manage DNS zones and record with external authoritative dns providers.
First supported DNS provider: PowerDNS
Github issue: #9958
Cwiki: https://cwiki.apache.org/confluence/display/CLOUDSTACK/DNS+Framework+and+Plugins
Doc PR: apache/cloudstack-documentation#646
Terminology:
API Changes
There are following APIs have been introduced to support DNS management from CloudStack and Instance auto registration:
UI changes




Supported network for Auto Registration: Shared network
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?