While trying to clean up our dependencies so a single Puppet run will do everything with no complaints I added requires to a few notifys. For example I went from something like this: file { "/go": contents => "go faster", notify => Service["httpd"], } to this: file { "/go": contents => "go faster", require => Service["httpd"], notify => Service["httpd"], } When I run puppet on the client I got this error: err: Got an uncaught exception of type SystemStackError: stack level too deep I see that the docs for require say Puppet will "autorequire everything that it can". So presumably notify implies require. Are "extra" requires forbidden or is that error a bug?
On Feb 18, 2008, at 7:36 AM, Mark Plaksin wrote:> While trying to clean up our dependencies so a single Puppet run > will do > everything with no complaints I added requires to a few notifys. For > example I went from something like this: > file { "/go": > contents => "go faster", > notify => Service["httpd"], > } > > to this: > file { "/go": > contents => "go faster", > require => Service["httpd"], > notify => Service["httpd"], > } > > When I run puppet on the client I got this error: > err: Got an uncaught exception of type SystemStackError: stack level > too deep > > I see that the docs for require say Puppet will "autorequire > everything > that it can". So presumably notify implies require. Are "extra" > requires forbidden or is that error a bug?Well, that error is a bug (and I hope you''re not using 0.24.1), but your code is broken too, because you''ve created a dependency cycle. -- One of the keys to happiness is a bad memory. -- Rita Mae Brown --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Luke Kanies <luke@madstop.com> writes:> On Feb 18, 2008, at 7:36 AM, Mark Plaksin wrote: > >> While trying to clean up our dependencies so a single Puppet run >> will do >> everything with no complaints I added requires to a few notifys. For >> example I went from something like this: >> file { "/go": >> contents => "go faster", >> notify => Service["httpd"], >> } >> >> to this: >> file { "/go": >> contents => "go faster", >> require => Service["httpd"], >> notify => Service["httpd"], >> } >> >> When I run puppet on the client I got this error: >> err: Got an uncaught exception of type SystemStackError: stack level >> too deep >> >> I see that the docs for require say Puppet will "autorequire >> everything >> that it can". So presumably notify implies require. Are "extra" >> requires forbidden or is that error a bug? > > Well, that error is a bug (and I hope you''re not using 0.24.1), but > your code is broken too, because you''ve created a dependency cycle.I thought I was using 0.24.1 but I think I was bitten by the lack of a package on the box in question. If you run install.rb for 0.24.1 on a machine that was running 0.23 you get this when running the client: Could not autoload "/opt/TWWfsw/ruby18p/lib/puppet/parser/ast/resource_override.rb": superclass mismatch for class ResourceOverride I''m pretty sure that boils down to "You don''t have a clean install of 0.24.1" and should be fixed. I fixed it and got a message about dependency cycle. But I don''t understand how it''s a cycle (assuming that means endless loop).
On Feb 18, 2008, at 9:20 AM, Mark Plaksin wrote:>>> to this: >>> file { "/go": >>> contents => "go faster", >>> require => Service["httpd"], >>> notify => Service["httpd"], >>> } >>It''s a dependency cycle because ''require'' means the httpd service should come first, and ''notify'' means it should come after. ''notify'' is a superset of ''before'', just like ''subscribe'' is a superset of ''require''. -- No matter how rich you become, how famous or powerful, when you die the size of your funeral will still pretty much depend on the weather. -- Michael Pritchard --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com