Ask Your Question
1

Puppet run stage not executing

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

bjoernhaeuser gravatar image

Hi,

i have this manifest: https://gist.github.com/bjoernhaeuser/b8b1e8a23149049c6258

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
1

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

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
0

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

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
0

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

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 ...
(more)
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

Stats

Asked: 2014-03-16 08:04:53 -0500

Seen: 195 times

Last updated: Mar 19 '14