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

Error: Could not set 'present' on ensure: No such file or directory - /etc/bind/named.conf.options20150404-12319-h6cff6.lock #94

Closed
setkeh opened this issue Apr 4, 2015 · 4 comments

Comments

@setkeh
Copy link

setkeh commented Apr 4, 2015

Hey guys i have an odd error i'm not sure if i have misconfigured something or not.

[root@dns ~]# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for dns.setkeh.local
Info: Applying configuration version '1428175723'
Notice: /Stage[main]/Dns::Server::Install/Package[bind-utils]/ensure: created
Notice: /Stage[main]/Dns::Server::Config/File[/etc/named]/owner: owner changed 'root' to 'named'
Notice: /Stage[main]/Dns::Server::Config/File[/etc/named]/mode: mode changed '0750' to '0755'
Notice: /Stage[main]/Dns::Server::Config/File[/etc/named/bind.keys.d/]/ensure: created
Notice: /Stage[main]/Dns::Server::Config/File[/etc/named.conf]/owner: owner changed 'root' to 'named'
Notice: /Stage[main]/Dns::Server::Config/File[/etc/named.conf]/mode: mode changed '0640' to '0644'
Info: /Stage[main]/Dns::Server::Config/File[/etc/named.conf]: Scheduling refresh of Class[Dns::Server::Service]
Info: /Stage[main]/Dns::Server::Config/File[/etc/named.conf]: Scheduling refresh of Class[Dns::Server::Service]
Error: Could not set 'present' on ensure: No such file or directory - /etc/bind/named.conf.options20150404-12319-h6cff6.lock at 87:/etc/puppet/modules/dns/manifests/server/options.pp
Error: Could not set 'present' on ensure: No such file or directory - /etc/bind/named.conf.options20150404-12319-h6cff6.lock at 87:/etc/puppet/modules/dns/manifests/server/options.pp
Wrapped exception:
No such file or directory - /etc/bind/named.conf.options20150404-12319-h6cff6.lock
Error: /Stage[main]/Main/Node[dns.setkeh.local]/Dns::Server::Options[/etc/bind/named.conf.options]/File[/etc/bind/named.conf.options]/ensure: change from absent to present failed: Could not set 'present' on ensure: No such file or directory - /etc/bind/named.conf.options20150404-12319-h6cff6.lock at 87:/etc/puppet/modules/dns/manifests/server/options.pp
Notice: /Stage[main]/Dns::Server::Config/Concat[/etc/named/named.conf.local]/File[/etc/named/named.conf.local]/ensure: defined content as '{md5}3a37399747950532b8d18b1e11188fcc'
Info: Concat[/etc/named/named.conf.local]: Scheduling refresh of Class[Dns::Server::Service]
Info: Class[Dns::Server::Service]: Scheduling refresh of Service[named]
Notice: /Stage[main]/Dns::Server::Service/Service[named]: Dependency         File[/etc/bind/named.conf.options] has failures: true
Warning: /Stage[main]/Dns::Server::Service/Service[named]: Skipping because of failed           dependencies
Notice: /Stage[main]/Dns::Server::Service/Service[named]: Triggered 'refresh' from 1 events
Notice: Finished catalog run in 4.56 seconds

my site.pp has

node 'dns.setkeh.local' {
  #puppet code

  include dns::server

  # Forwarders
  dns::server::options { '/etc/bind/named.conf.options':
    forwarders => [ '8.8.8.8', '8.8.4.4' ]
  }

  # Forward Zone
  dns::zone { 'setkeh.local':
    soa         => 'ns1.setkeh.local',
    soa_email   => 'setkeh@gmail.com',
    nameservers => ['ns1']
  }

  # Reverse Zone
  dns::zone { '1.168.192.IN-ADDR.ARPA':
    soa         => 'ns1.setkeh.local',
    soa_email   => 'setkeh@gmail.com',
    nameservers => ['ns1']
  }

  # A Records:
  dns::record::a {
    'dns':
      zone => 'setkeh.local',
      data => ['192.168.1.254'],
      ptr  => true;
    'test':
      zone => 'setkeh.local',
      data => ['192.168.1.12'],
      ptr  => true;
  }
}

Any suggestions on how to fix this ??
Thanks :)

@solarkennedy
Copy link
Collaborator

/etc/bind is not being created?
We usually leave that up to the package to create.

But /etc/named?

We have some sort of mistmatch between /etc/bind and /etc/named somewhere.

What OS is this?

@setkeh
Copy link
Author

setkeh commented Apr 5, 2015

It is Centos 7 core installation,
i have also just done ls on /etc and there is no /etc/bind and there is /etc/named

[root@dns ~]# ls /etc/named
bind.keys.d  named.conf.local
[root@dns ~]# 

Cheers :D

@solarkennedy
Copy link
Collaborator

Well, your dns::server::options line is asking it to be in /etc/bind, which for your OS is incorrect.

Granted, our module could be re-factored to not let you put a file in a non-standard place?

@setkeh
Copy link
Author

setkeh commented Apr 5, 2015

Ahh, i have corrected it and it is working perfectly :D i was unaware centos had a nonstandard path thanks 👍

@setkeh setkeh closed this as completed Apr 5, 2015
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

2 participants