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

Allow configuration checks to be turned off #178

Merged
merged 1 commit into from
Nov 1, 2020

Conversation

coreone
Copy link
Contributor

@coreone coreone commented Oct 29, 2020

I was having the same issue as described in #164 so I added this so the checks could be turned off if needed.

Copy link
Contributor

@alexjfisher alexjfisher left a comment

Choose a reason for hiding this comment

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

LGTM other than a couple of very minor style suggestions.

spec/classes/dns_init_spec.rb Outdated Show resolved Hide resolved
spec/classes/dns_init_spec.rb Outdated Show resolved Hide resolved
manifests/init.pp Show resolved Hide resolved
@ekohl ekohl merged commit cb7933a into theforeman:master Nov 1, 2020
penguinspiral added a commit to penguinspiral/puppet-control-repo that referenced this pull request Jan 13, 2021
The 'Profiles' module class 'dns' currently relies entirely upon the
functionality of the community component module 'theforeman-dns'.
Examining the implementation of this component module reveals that the
ISC BIND9 configuration validator, `/usr/sbin/named-checkconf`, is
used to verify the generated configuration files.

This configuration verification process includes all DNS view files
located under the '/etc/bind/views/' directory. The Embedded RuBy (ERB)
template for generating DNS view configuration files within the
'theforeman-dns' module does *not* populate configured ACLs as part of
template rendering. This results in the following error when
`/usr/sbin/named-checkconfig` is invoked against the view configuration
file:

raft.com.conf:6: undefined ACL 'trusted'
raft.com.conf:4: undefined ACL 'trusted'
raft.com.conf:5: undefined ACL 'trusted'

The lack of ACL definition within the DNS view configuration file causes
`/usr/sbin/named-checkconfig` to return exit code 1 which in turn
results in Puppet failing to apply the remaining catalogue.

It should be noted that due to the "include" ordering within the ISC
BIND9 configuration the declaration of the configured ACL within the
'named.conf' file is sufficient for ISC BIND9 server to run correctly.
The contents of the view referencing an "external" (insomuch it is
defined in a separate configuration file) is perfectly valid given the
previously instantiated ACL.

It is likely the next release of the 'theforeman-dns' community
component module will likely contain an option for omitting the
currently compulsory `/usr/sbin/named-checkconfig` checks given the
functionality was recently merged:
theforeman/puppet-dns#178

This commit addresses a temporary, limited workaround whereby the
originally specified ACL, 'trusted', is now simply "aliased" in Hiera.
Ultimately its a shift in redirection from the ISC BIND9 server
configuration "layer" to the Puppet manifest data-driven "layer". The
restriction here is that Hiera can only alias a single ACL hash whereby
ISC BIND9 could define an arbitrary amount of ACLs.

This commit should be reverted once 'theforeman-dns' community component
module supports disabling/omitting the `/usr/sbin/named-checkconfig`
configuration validation.
@coreone coreone deleted the checkconf branch September 10, 2021 14:42
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.

4 participants