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

named-checkconf on named.conf fails due to execution order problem #209

Open
diLLec opened this issue Mar 9, 2022 · 0 comments
Open

named-checkconf on named.conf fails due to execution order problem #209

diLLec opened this issue Mar 9, 2022 · 0 comments

Comments

@diLLec
Copy link

diLLec commented Mar 9, 2022

In our environment the following error is thrown when using the dns module:

Error: /Stage[main]/Dns::Config/Concat[/etc/named.conf]/File[/etc/named.conf]/content: change from '{md5}bdddc3e08bde5104b16abf184f83c595' to '{md5}6b06a55481ffdc7be89c2dcf03cbeede' failed: Execution of '/usr/sbin/named-checkconf /etc/named.conf20220309-56666-ap026i' returned 1: /etc/named.conf20220309-56666-ap026i:16: open: /etc/named/zones.conf: file not found (corrective)

We found that this must be an execution order problem as the named.conf includes the statement

include "/etc/named/zones.conf";

We fixed the problem in our code with the following execution order constraint:

Concat['/etc/named/zones.conf']->Concat['/etc/named.conf']

In the modules code the code in config.pp (

concat { $dns::namedconf_path:
) should be extended like the following to address the issue

  concat { $dns::namedconf_path:
    owner        => 'root',
    group        => $dns::params::group,
    mode         => '0640',
    require      => [
     Concat[$dns::optionspath],
     Concat[$dns::publicviewpath],
    ]
    validate_cmd => $validate_cmd,
  }
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

No branches or pull requests

1 participant