[Puppet Users] Re: Breaking operations on errors
On Aug 22, 9:28 am, Brian Troutwine wrote: > On Mon, Aug 22, 2011 at 10:11 AM, jcbollinger > wrote: > > > > > > > > > On Aug 19, 7:30 pm, Brian Troutwine wrote: > > > Hello, all. > > > > Let's say I am building a super-weapon robot to destroy the world, save > > for > > > the people on a whitelist, and am using puppet to manage the > > configuration > > > of this robot. > > > > $ cat files/do_not_kill.txt > > > Me > > > Mom > > > Dad > > > Wife > > > > The robot will only being its rampage when /root/have_a_good_time exists. > > My > > > puppet configuration, in part, looks like so: > > > > file { '/root/have_a_good_time': > > > ensure => present, > > > ... > > > require => File['/root/do_not_kill.txt'], > > > > } > > > > file { '/root/do_not_kill.txt': > > > ensure => present, > > > ... > > > source => "puppet:///files/donut_kill.txt", > > > > } > > > > Those with sharp eyes will note that the inclusion of the whitelist will > > > fail miserably: the source is wrong. But then, > > > > # puppet agent --test > > > > Uh oh. The enabler of the killer robot will be put into place because, > > > despite the error, execution continued and we're all dead, me especially. > > > How do I signal that I want to break execution on errors or, at least, > > not > > > continue on with the sub-tree of actions which the erroring resource is > > the > > > root of? > > > You left out the "MUWAHAHAAHHH!!!" Did you perhaps also leave out the > > output from 'puppet agent'? > > > The behavior you request is what Puppet normally provides: if applying > > a resource fails then other resources that depend on it do not get > > applied. How about posting the output from 'puppet agent --test -- > > debug' with your manifest? Also, make sure that the agent is actually > > getting the catalog with those resources. > > How do I ensure this last bit? The last catalog received from the server is cached on the client in YAML form. Look on the client in /var/lib/puppet. It is fairly readable for simple manifests, but you would probably want a YAML browser for complex ones. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Breaking operations on errors
On Mon, Aug 22, 2011 at 10:11 AM, jcbollinger wrote: > > > On Aug 19, 7:30 pm, Brian Troutwine wrote: > > Hello, all. > > > > Let's say I am building a super-weapon robot to destroy the world, save > for > > the people on a whitelist, and am using puppet to manage the > configuration > > of this robot. > > > > $ cat files/do_not_kill.txt > > Me > > Mom > > Dad > > Wife > > > > The robot will only being its rampage when /root/have_a_good_time exists. > My > > puppet configuration, in part, looks like so: > > > > file { '/root/have_a_good_time': > > ensure => present, > > ... > > require => File['/root/do_not_kill.txt'], > > > > } > > > > file { '/root/do_not_kill.txt': > > ensure => present, > > ... > > source => "puppet:///files/donut_kill.txt", > > > > } > > > > Those with sharp eyes will note that the inclusion of the whitelist will > > fail miserably: the source is wrong. But then, > > > > # puppet agent --test > > > > Uh oh. The enabler of the killer robot will be put into place because, > > despite the error, execution continued and we're all dead, me especially. > > How do I signal that I want to break execution on errors or, at least, > not > > continue on with the sub-tree of actions which the erroring resource is > the > > root of? > > > You left out the "MUWAHAHAAHHH!!!" Did you perhaps also leave out the > output from 'puppet agent'? > > The behavior you request is what Puppet normally provides: if applying > a resource fails then other resources that depend on it do not get > applied. How about posting the output from 'puppet agent --test -- > debug' with your manifest? Also, make sure that the agent is actually > getting the catalog with those resources. > > How do I ensure this last bit? > > John > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- Brian L. Troutwine -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Breaking operations on errors
On Aug 19, 7:30 pm, Brian Troutwine wrote: > Hello, all. > > Let's say I am building a super-weapon robot to destroy the world, save for > the people on a whitelist, and am using puppet to manage the configuration > of this robot. > > $ cat files/do_not_kill.txt > Me > Mom > Dad > Wife > > The robot will only being its rampage when /root/have_a_good_time exists. My > puppet configuration, in part, looks like so: > > file { '/root/have_a_good_time': > ensure => present, > ... > require => File['/root/do_not_kill.txt'], > > } > > file { '/root/do_not_kill.txt': > ensure => present, > ... > source => "puppet:///files/donut_kill.txt", > > } > > Those with sharp eyes will note that the inclusion of the whitelist will > fail miserably: the source is wrong. But then, > > # puppet agent --test > > Uh oh. The enabler of the killer robot will be put into place because, > despite the error, execution continued and we're all dead, me especially. > How do I signal that I want to break execution on errors or, at least, not > continue on with the sub-tree of actions which the erroring resource is the > root of? You left out the "MUWAHAHAAHHH!!!" Did you perhaps also leave out the output from 'puppet agent'? The behavior you request is what Puppet normally provides: if applying a resource fails then other resources that depend on it do not get applied. How about posting the output from 'puppet agent --test -- debug' with your manifest? Also, make sure that the agent is actually getting the catalog with those resources. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.