Ask Your Question

Error: Failed to apply catalog: undefined method `ancestors' for nil:NilClass

asked 2014-09-08 09:55:13 -0600

Krist van Besien gravatar image

I'm getting the following error when I apply my manifest:

Error: Failed to apply catalog: undefined method `ancestors' for nil:NilClass

I have no idea what causes this error could someone explain?

I also suspect that it might have something to do with the catalogs in puppetdb not being consistent. Is there a way to purge puppetdb? Could I just drop everything in puppetdb and count on subsequent runs om my hosts to populate it again?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-09-08 10:05:12 -0600

Krist van Besien gravatar image

Turns out that the cause was something else altogether.

I'm populating /etc/hosts with the following code...

 @@host{ "${storehost}":
          ip  => $::ipaddress_bond0_300,
          tag => ['gluster']

  Host <<| tag == 'gluster' |>>

In order to clean things up a bit I decided to just drop all the exported resources of type "Host" from the DB, and then delete /etc/hosts and run puppet. But the "host" resource requires a /etc/hosts to already be present. It fails (with this unhelpful message) when /etc/hosts is absent.

touching /etc/hosts everywhere solved it...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-09-08 09:55:13 -0600

Seen: 1,044 times

Last updated: Sep 08 '14