-
-
Notifications
You must be signed in to change notification settings - Fork 51
Add support for YAML config #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Support Debian 13, Ubuntu 22.04, Ubuntu 24.04
pdns config file owner on Debian
|
FYI: I'm not a maintainer anymore. I think for this to be released all operating systems need to be supported. This can be in multiple PR's, as long as someone ensures no release goes out with partial YAML support. @deric this PR includes the upgrade to PowerDNS 5 in #232. It's better to leave that out. |
|
Debian 13 currently has problems with mysql tests: which is out of scope of this module, the issue is tracked here: puppetlabs/puppetlabs-mysql#1670 |
|
For somebody who isn't a maintainer any longer, you certainly have strong opinions about the scope of the project and the commitments it requires. I'll stick with my fork for our needs while you neckbeards worry about the 2%. |
|
@peelman you mistakenly think that I have a strong opinion about it though. I don't.
That's fine, it's the beauty of open source. You can fork when you disagree or when you need something that's not released.
I spent hours and hours of my spare time on this project in the last 9 years. If you feel wronged because a feature isn't immediately there or when someone has a different idea about the scope of the project, don't use this package, fork it, do whatever you want with it. Complaining about something when people spend their own time building things is just stupid. Good luck with your fork. |
Since 5.3 recursor.conf is parsed as yaml file
|
Hi, @deric thank you for the PR, new features are always appreciated.
This has little to do with strong opinions. Vox Pupuli maintains 198 modules right now, with 237 people. In order to keep this alive, it's required to have proper review and contribution guidelines. They are also linked when you raise a PR (but GitHub does a good job at hiding them somewhere on the site 😞 ). The review guidelines are here: https://voxpupuli.org/docs/reviewing_pr/. A few highlights that are relevant here:
Please stay friendly. Also this has nothing to do with some weird edge cases. When CI doesn't pass on the HEAD branch anymore, it's impossible to merge new features because we cannot verify them anymore (at least not with way more effort). |
spec/defines/powerdns_config_spec.rb
Outdated
| on_supported_os.each do |os, facts| | ||
| # ---- RUN Legacy Config TESTS ONLY ON Non-YAML-Supporting OSes ---- | ||
| debian_family = facts[:os]['family'] == 'Debian' | ||
| debian_ok = facts[:os]['name'] == 'Debian' && %w[12 13].include?(facts[:os]['release']['major']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the newer operating systems still support the old format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://doc.powerdns.com/recursor/yamlsettings.html
With the release of 5.2.0, the default will be to expect a YAML configuration file and reading of old-style recursor.conf files will have to be enabled specifically by providing a command line option --enable-old-settings.
In a future release support for the “old-style” recursor.conf settings file will be dropped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5.0 and 5.1 do support, 5.2 and newer would require overriding the systemd service file in order to pass --enable-old-settings on most distributions.
We should be testing here different powerdns versions (in combinations with OS version).
data/os/Debian/12.yaml
Outdated
| powerdns::mysql_collate: utf8mb3_general_ci | ||
| powerdns::authoritative_version: "5.0" | ||
| powerdns::recursor_version: "5.3" | ||
| powerdns::recursor_use_yaml: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we make the decision based on the recursor_version?
Note
Starting with version 5.0.0, Recursor supports a new YAML syntax for configuration files as described here. If both recursor.conf and recursor.yml files are found in the configuration directory the YAML file is used. A configuration using the old style syntax can be converted to a YAML configuration using the instructions in [Conversion of old-style settings to YAML format](https://doc.powerdns.com/recursor/appendices/yamlconversion.html).
Release 5.0.0 will install a default old-style recursor.conf file.
Starting with version 5.1.0, in the absence of a recursor.yml file, an existing recursor.conf will be processed as YAML, if that fails, it will be processed as old-style configuration. Packages will stop installing a old-style recursor.conf file and start installing a default recursor.conf file containing YAML syntax.
With the release of 5.2.0, the default will be to expect a YAML configuration file and reading of old-style recursor.conf files will have to be enabled specifically by providing a command line option --enable-old-settings.
In a future release support for the “old-style” recursor.conf settings file will be dropped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saz Yeah, you're right. There are no earlier packages for Debian 13. For Debian 12 we shouldn't set the version (any recursor version between 4.8 to 5.3 is supported). See https://repo.powerdns.com/debian/dists/
|
There's an overview on https://repo.powerdns.com/ with supported versions per distro and release. |
Pull Request (PR) description
Powerdns supports yaml config since version
5.0. Since5.2the defaultrecursor.confwill be parsed as YAML unless--enable-old-settingsflag is provided (which this module currently doesn't support) orrecursor.ymlconfig exists. This is rather a breaking change (on powerdns side).Upgrading the old config, e.g.:
requires non-trivial changes, but can be generated using
rec_control show-yamlif you upgraded to at least5.0release first.The PR replaces old configs by "new" YAML configs with
.confextensions by default. This might be confusing, but keeping both files would be even more confusing, considering that both configs would be parsed by the Recursor (recursor.ymltakes precedence, if exists).Just iterating on @peelman work done in #226. Debian 13 currently requires more work, will be done in separate PR.
This Pull Request (PR) fixes the following issues
Fixes #172