Skip to content

Add support for variant zones creation#179

Open
fpicot wants to merge 4 commits intokpfleming:mainfrom
fpicot:feature/variant_zones
Open

Add support for variant zones creation#179
fpicot wants to merge 4 commits intokpfleming:mainfrom
fpicot:feature/variant_zones

Conversation

@fpicot
Copy link

@fpicot fpicot commented Feb 26, 2026

Fixes #178 by canonicalized zone name in SOA/NS records.

zone_struct["nameservers"] = []

# If zone is a variant name, use the cannonical name in the records.
zone_canonical = zone.split('..')[0] + '.' if '..' in zone else zone
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work fine for now; I've got a large branch that I've been slowly working on which will use dnspython to properly canonicalize DNS names in this collection, so it will be interesting to see how that interacts when I get to work on it again.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also run tox -elint locally to ensure that all the linter and other checks pass before updating the PR branch.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, PR is updated.

# supply an empty nameserver list since NS records will be supplied in the rrsets
zone_struct["nameservers"] = []

# If zone is a variant name, use the cannonical name in the records.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

            # If zone is a variant name, use the canonical name in the records.

- not result.failed
- result.changed

- name: check "Variant" zone creation
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll have to find a way to only run these tests when the pdns-auth version is 5.0 or higher. That will require some thought.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a check on the variable pdns_version which comes from the environment of the ci toolchain. However, I'm realizing that the backend used in the tests is sqlite, which doesn't support variant zones. This would also requires using LMDB.

@fpicot fpicot force-pushed the feature/variant_zones branch from 6b20aed to 51dc95c Compare March 3, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for variant zones

2 participants