Skip to content

[WIP] DNS provider framework - PowerDNS plugin#12737

Draft
sudo87 wants to merge 38 commits intoapache:mainfrom
shapeblue:dnsProviderFramework
Draft

[WIP] DNS provider framework - PowerDNS plugin#12737
sudo87 wants to merge 38 commits intoapache:mainfrom
shapeblue:dnsProviderFramework

Conversation

@sudo87
Copy link
Copy Markdown
Contributor

@sudo87 sudo87 commented Mar 3, 2026

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. PowerDNS is the first provider for initial implementation.

Github issue: #9958
Cwiki: https://cwiki.apache.org/confluence/display/CLOUDSTACK/DNS+Framework+and+Plugins

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

sudo87 added 22 commits February 9, 2026 10:52
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
1. port for dns_server
2. remove hard coded localhost for server_id
3. resolve and store server id if not passed in the api request
4. restrict public dns_server for domain admins and admins
…elete events

2. add dnsrecordurl in nic_details table
3. add dnsrecordurl in vm response
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 81.84882% with 377 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.24%. Comparing base (4f93ba8) to head (9d4e141).

Files with missing lines Patch % Lines
.../apache/cloudstack/dns/DnsProviderManagerImpl.java 77.55% 95 Missing and 48 partials ⚠️
...apache/cloudstack/dns/powerdns/PowerDnsClient.java 78.82% 19 Missing and 28 partials ⚠️
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 30.76% 26 Missing and 1 partial ⚠️
...n/java/org/apache/cloudstack/dns/vo/DnsZoneVO.java 58.92% 21 Missing and 2 partials ⚠️
...pache/cloudstack/api/response/DnsZoneResponse.java 55.81% 18 Missing and 1 partial ⚠️
...che/cloudstack/api/response/DnsServerResponse.java 69.23% 11 Missing and 1 partial ⚠️
.../main/java/com/cloud/vm/dao/NicDetailsDaoImpl.java 0.00% 12 Missing ⚠️
...ava/org/apache/cloudstack/dns/DnsProviderUtil.java 76.47% 6 Missing and 6 partials ⚠️
server/src/main/java/com/cloud/api/ApiDBUtils.java 0.00% 10 Missing ⚠️
.../apache/cloudstack/dns/vo/DnsZoneNetworkMapVO.java 69.69% 9 Missing and 1 partial ⚠️
... and 30 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #12737      +/-   ##
============================================
+ Coverage     18.00%   18.24%   +0.24%     
- Complexity    16455    16808     +353     
============================================
  Files          5976     6028      +52     
  Lines        537582   540019    +2437     
  Branches      66006    66297     +291     
============================================
+ Hits          96784    98524    +1740     
- Misses       429885   430480     +595     
- Partials      10913    11015     +102     
Flag Coverage Δ
uitests 3.49% <ø> (-0.04%) ⬇️
unittests 19.43% <81.84%> (+0.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@winterhazel winterhazel added this to the 4.23.0 milestone Mar 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 9, 2026

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@weizhouapache weizhouapache linked an issue Mar 13, 2026 that may be closed by this pull request
@sudo87 sudo87 force-pushed the dnsProviderFramework branch from 90c0ba7 to a9afbce Compare March 13, 2026 14:38
@github-actions
Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@sudo87 sudo87 force-pushed the dnsProviderFramework branch from e9de026 to 981bb64 Compare March 19, 2026 11:12
@sudo87 sudo87 force-pushed the dnsProviderFramework branch from a6e812b to bde9fd9 Compare March 23, 2026 09:31
sudo87 added 2 commits March 23, 2026 18:21
1. Remove usage of in-memory eventBus for VM lifecycle events
2. Publish event for VM, NIC and DNS record delete events into  messageBus
3. Introducer subscribers for above topics
@sudo87
Copy link
Copy Markdown
Contributor Author

sudo87 commented Mar 26, 2026

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@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.

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17245

@github-actions
Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DNS Provider for CloudStack

3 participants