Skip to content
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

Add support for managing sysconfig settings #145

Merged
merged 1 commit into from
May 21, 2019

Conversation

antaflos
Copy link
Contributor

Debian and RedHat allow setting startup options and other settings via a
sysconfig/default file (/etc/default/bind9 under Debian and
/etc/sysconfig/named under RedHat). FreeBSD/DragonFly and ArchLinux
don't have a direct equivalent.

This change allows managing sysconfig/default settings under Debian and
RedHat. It is especially useful for setting startup options like -4 to
disable IPv6 support in named, or setting the debug level with -d. The
change adds a few specific $dns::sysconfig_* parameters to model the
default behaviour under Debian and RedHat, as well as a
$dns::sysconfig_additional_settings hash parameter that allows setting
arbitrary key-value pairs in the sysconfig file.

For FreeBSD/DragonFly and ArchLinux these parameters are all set to
undef and not used anywhere since they feature is no directly equivalent
sysconfig setup.

This change also adds basic spec tests for Debian, including tests for
the sysconfig support introduced here.

Debian and RedHat allow setting startup options and other settings via a
sysconfig/default file (/etc/default/bind9 under Debian and
/etc/sysconfig/named under RedHat). FreeBSD/DragonFly and ArchLinux
don't have a direct equivalent.

This change allows managing sysconfig/default settings under Debian and
RedHat. It is especially useful for setting startup options like `-4` to
disable IPv6 support in named, or setting the debug level with `-d`. The
change adds a few specific `$dns::sysconfig_*` parameters to model the
default behaviour under Debian and RedHat, as well as a
`$dns::sysconfig_additional_settings` hash parameter that allows setting
arbitrary key-value pairs in the sysconfig file.

For FreeBSD/DragonFly and ArchLinux these parameters are all set to
undef and not used anywhere since they feature is no directly equivalent
sysconfig setup.

This change also adds basic spec tests for Debian, including tests for
the sysconfig support introduced here.
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I'm wondering if we should always use systemd drop in files instead. Right now I'm very busy so I probably won't have time to properly review this in the next 2 weeks.

@ekohl ekohl merged commit cb3dfa9 into theforeman:master May 21, 2019
@antaflos
Copy link
Contributor Author

@ekohl It seems that Ubuntu 18.04 (and probably Debians as well) still uses /etc/init.d/bind9 to manage the service so systemd drop-in files won't help there :(

@antaflos
Copy link
Contributor Author

It seems I was wrong. Both Ubuntu 16.04 and 18.04 provide systemd unit files for bind9, but both read /etc/default/bind9 as EnvironmentFile and pass the $OPTIONS variable to the ´ExecStart` commandline, so this change still makes sense.

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.

3 participants