Ask Your Question
0

Detecting broken dependency graphs

asked 2014-03-31 16:36:00 -0500

ddub gravatar image

I am attempting to detect if there are broken dependencies within our catalogs, for instance if I do the following;

$ mkdir manifests

$ cat << EOF > manifests/site.pp

exec { 'example process':

command => '/bin/ps',

user => 'postgres',

require => File['/does/not/exist'],

}

EOF

$ puppet master --compile test --debug --verbose --vardir . --confdir .

I was hoping that the compile would do a cursor static analysis of the catalog prior to completing compilation, but this blindly produces a broken catalog.

I tried to check with the following, however;

$ puppet apply --noop --catalog catalog.pson

Error: Could not run: Parameter user failed on Exec[example process ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-04-01 04:19:23 -0500

doc75 gravatar image

Did you try to use rspec-puppet to perform this analysis ? It has the capabiloty to check if catalog compile or not.

Hope this helps.

edit flag offensive delete link more

Comments

it { should compile.with_all_deps } is exactly what I was looking for thanks! Spoke too soon, it also fails with Parameter user failed on Exec ok, added Puppet.features.add(:root ...(more)

ddub gravatar imageddub ( 2014-04-01 08:51:24 -0500 )edit

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

Stats

Asked: 2014-03-31 16:36:00 -0500

Seen: 106 times

Last updated: Apr 01 '14