Skip to content

[WIP] DNS provider framework - PowerDNS plugin#12737

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

[WIP] DNS provider framework - PowerDNS plugin#12737
sudo87 wants to merge 53 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.

First supported DNS provider: PowerDNS

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

Untitled Diagram drawio

Terminology:

  1. DNS Server: integration between CloudStack and DNS provider
  2. DNS Zone: Domain scope
  3. DNS Record: mapping entry with dns zones (e.g. mapping between names and ip)

API Changes

There are following APIs have been introduced to support DNS management from CloudStack and Instance auto registration:

  • [add/update/delete]DnsServer
  • [create/update/delete]DnsZone
  • [create/delete]DnsRecord
  • [associate/disassociate]DnsZoneToNetwork

UI changes
Screenshot 2026-04-27 at 4 38 42 PM
Screenshot 2026-04-27 at 4 38 49 PM
Screenshot 2026-04-27 at 4 38 57 PM
Screenshot 2026-04-27 at 4 39 21 PM

  • DNS Server subsection under Network
  • DNS Zone subsection under Network
  • DNS records management tab in the Dns Zone

Supported network for Auto Registration: Shared network

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 79.16840% with 501 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.27%. Comparing base (82bfa9f) to head (df5c3e6).
⚠️ Report is 54 commits behind head on main.

Files with missing lines Patch % Lines
.../apache/cloudstack/dns/DnsProviderManagerImpl.java 80.30% 108 Missing and 47 partials ⚠️
...ava/org/apache/cloudstack/dns/DnsProviderUtil.java 62.50% 33 Missing and 12 partials ⚠️
...g/apache/cloudstack/dns/dao/NicDnsJoinDaoImpl.java 0.00% 45 Missing ⚠️
...apache/cloudstack/dns/powerdns/PowerDnsClient.java 83.12% 12 Missing and 28 partials ⚠️
...ava/org/apache/cloudstack/dns/vo/NicDnsJoinVO.java 0.00% 33 Missing ⚠️
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 45.09% 26 Missing and 2 partials ⚠️
...n/java/org/apache/cloudstack/dns/vo/DnsZoneVO.java 53.57% 24 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 ⚠️
... and 32 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #12737      +/-   ##
============================================
+ Coverage     17.95%   18.27%   +0.31%     
- Complexity    16522    16970     +448     
============================================
  Files          6022     6083      +61     
  Lines        541387   544933    +3546     
  Branches      66346    66793     +447     
============================================
+ Hits          97211    99586    +2375     
- Misses       433210   434224    +1014     
- Partials      10966    11123     +157     
Flag Coverage Δ
uitests 3.49% <ø> (-0.04%) ⬇️
unittests 19.46% <79.16%> (+0.35%) ⬆️

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.

@sudo87
Copy link
Copy Markdown
Contributor Author

sudo87 commented Apr 17, 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 17530

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian test result (tid-15906)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 50073 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12737-t15906-kvm-ol8.zip
Smoke tests completed. 151 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_redundant_vpc_site2site_vpn Failure 369.74 test_vpc_vpn.py

@sudo87
Copy link
Copy Markdown
Contributor Author

sudo87 commented Apr 20, 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 17552

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian test result (tid-15924)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 48629 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12737-t15924-kvm-ol8.zip
Smoke tests completed. 151 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_06_create_a_dns_record Failure 16.14 test_dns_framework_powerdns.py
test_07_create_aaaa_dns_records Failure 16.15 test_dns_framework_powerdns.py
test_08_create_mx_dns_record Failure 16.13 test_dns_framework_powerdns.py

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian test result (tid-15933)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 57119 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12737-t15933-kvm-ol8.zip
Smoke tests completed. 151 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_provision_certificate Error 120.64 test_certauthority_root.py

1. stop and start vm operations wont trigger dns sync
2. ip update for nic will refresh dns records
@sudo87
Copy link
Copy Markdown
Contributor Author

sudo87 commented Apr 24, 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 17598

@weizhouapache
Copy link
Copy Markdown
Member

@sudo87
thanks for the PR
is this ready for review and QA ?

can you update the description to summarize the changes ?
can you compare with the design on cwiki page and list the differences if any ?

@sudo87
Copy link
Copy Markdown
Contributor Author

sudo87 commented Apr 27, 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 ✖️ debian ✖️ suse15. SL-JID 17614

@sudo87 sudo87 force-pushed the dnsProviderFramework branch from 8ca39da to e997f4c Compare April 27, 2026 08:32
@sudo87
Copy link
Copy Markdown
Contributor Author

sudo87 commented Apr 27, 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 17616

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

4 participants