Ask Your Question

Puppet run stage not executing

asked 2014-03-16 08:04:53 -0600

bjoernhaeuser gravatar image


i have this manifest:

Running this manifest with the stage attached, nothing happens. Removing the stage the manifest runs fine.

I have no idea why this isn't working.

Thanks in advance Björn

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2014-03-19 02:33:02 -0600

bjoernhaeuser gravatar image

Ok, I was able to figure it out after upgrading the puppet agent to 3.4.2. Was running 3.1.x. The problem was circular dependency.

  exec { "update-alternatives-javac":
    command     => "/usr/sbin/update-alternatives --set javac /usr/java/default/bin/javac",
    refreshonly => true,
    subscribe   => Package['jdk'],
    require     => Exec["update-alternatives-javac"],

See that the require depends on it self. The 3.1. agent did not complain about that and stopped executing afterwards. The 3.4.x agent did complain, I figured it out, and everything went smooth afterwards!

Thanks for your input!

edit flag offensive delete link more

answered 2014-03-16 13:42:43 -0600

ramindk gravatar image

You might try it without the resource chain.

stage { 'before': before => Stage['main'] }
stage { 'after':  after => Stage['main'] }
edit flag offensive delete link more

answered 2014-03-16 13:57:10 -0600

Stefan gravatar image

I just have a general observation: You use a lot of exec resources when you can probably use puppet's native service type. Depending on your operatingsystem you may have to explicitly pass provider => upstart to your service resource, e.g.

service { 'svscan':
  ensure   => stopped,
  enable   => false,
  provider => upstream,

To your actual problem: Please define "nothing happens": What happens when you run puppet with the --debug flag? I just replaced your exec resource with notify resources (because I don't have the necessary commands on my system) and it works as expected on my system.

% puppet apply -v /tmp/test ...
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-03-16 08:04:53 -0600

Seen: 227 times

Last updated: Mar 19 '14