CloudStack DNS framework - Integrate PowerDNS as first plugin#12737
CloudStack DNS framework - Integrate PowerDNS as first plugin#12737sudo87 wants to merge 60 commits intoapache:mainfrom
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.03% 18.29% +0.25%
- Complexity 16648 17013 +365
============================================
Files 6035 6091 +56
Lines 542487 545414 +2927
Branches 66477 66837 +360
============================================
+ Hits 97854 99794 +1940
- Misses 433612 434483 +871
- Partials 11021 11137 +116
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 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. |
|
@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 17627 |
| private List<String> nameServers; | ||
|
|
||
| @Parameter(name = "externalserverid", type = CommandType.STRING, description = "External server id or hostname for the DNS server, e.g., 'localhost' for PowerDNS") | ||
| private String externalServerId; |
There was a problem hiding this comment.
is it applicable for PowerDNS only ?
I think we'd better avoid provider-specific parameters
| @ACL(accessType = SecurityChecker.AccessType.OperateEntry) | ||
| @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DnsZoneResponse.class, required = true, | ||
| description = "The ID of the DNS zone") | ||
| private Long id; |
There was a problem hiding this comment.
when delete a DNS zone, is it possible to keep the DNS records on the external provider ?
There was a problem hiding this comment.
No, DNS records will no longer exist once DNS zone is deleted.
| public enum DnsProviderType { | ||
| PowerDNS; | ||
| // Cloudflare | ||
| } |
There was a problem hiding this comment.
there is an API to list all available DNS provider types:
ListDnsProvidersCmd, which calls listProviderNames
this enum may be not needed
There was a problem hiding this comment.
this is used other places and is not used in listDnsProviderCmd
| } | ||
| HttpPost request = new HttpPost(buildUrl(baseUrl, port, "/servers/" + externalServerId + "/zones")); | ||
| request.setEntity(new StringEntity(json.toString(), StandardCharsets.UTF_8)); | ||
| JsonNode response = execute(request, apiKey, 201); |
There was a problem hiding this comment.
if the DNS zone already exists in powerdns, what will happen ?
There was a problem hiding this comment.
I wonder if DNS zone existence need to be checked before each DNS zone operation (create, update, list, delete), it will lead to 1 more API and cause longer response time. need to consider the trade-offs
There was a problem hiding this comment.
Client throws DnsConflictException and it is shown in the API response as error:
DNS zone: %s already exists"
|
@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 17639 |
dd4e94b to
9c435d6
Compare
…s for AddDnsServerCmd
741a410 to
8e9fe78
Compare
8e9fe78 to
8d365cb
Compare
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@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 ✔️ debian ✖️ suse15. SL-JID 17671 |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17674 |
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?