Skip to content

[WIP] DNS provider framework - PowerDNS plugin#12737

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

[WIP] DNS provider framework - PowerDNS plugin#12737
sudo87 wants to merge 35 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 3.89016% with 2100 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.95%. Comparing base (b744824) to head (c6abed1).
⚠️ Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
.../apache/cloudstack/dns/DnsProviderManagerImpl.java 0.00% 637 Missing ⚠️
...apache/cloudstack/dns/powerdns/PowerDnsClient.java 18.01% 178 Missing and 4 partials ⚠️
...ache/cloudstack/dns/powerdns/PowerDnsProvider.java 0.00% 109 Missing ⚠️
.../apache/cloudstack/dns/DnsVmLifecycleListener.java 0.00% 107 Missing ⚠️
...java/org/apache/cloudstack/dns/vo/DnsServerVO.java 0.00% 104 Missing ⚠️
.../org/apache/cloudstack/dns/dao/DnsZoneDaoImpl.java 0.00% 62 Missing ⚠️
...rg/apache/cloudstack/dns/dao/DnsServerDaoImpl.java 0.00% 59 Missing ⚠️
...n/java/org/apache/cloudstack/dns/vo/DnsZoneVO.java 0.00% 56 Missing ⚠️
...udstack/api/command/user/dns/CreateDnsZoneCmd.java 0.00% 51 Missing ⚠️
...oudstack/api/command/user/dns/AddDnsServerCmd.java 0.00% 48 Missing ⚠️
... and 46 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #12737      +/-   ##
============================================
- Coverage     18.02%   17.95%   -0.07%     
- Complexity    16450    16462      +12     
============================================
  Files          5968     6021      +53     
  Lines        537086   539631    +2545     
  Branches      65961    66270     +309     
============================================
+ Hits          96819    96904      +85     
- Misses       429347   431801    +2454     
- Partials      10920    10926       +6     
Flag Coverage Δ
uitests 3.50% <ø> (-0.04%) ⬇️
unittests 19.12% <3.89%> (-0.07%) ⬇️

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

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