Issue #5349 has been updated by Dan Bode.
I have seen the same problem with composite classes. I think that stages should
follow all resources (including classes through inclusion)
My use case is something like:
<pre>
:!puppet apply /private/tmp/foo.pp --noop
err: Could not apply complete catalog: Found 1 dependency cycle:
(Stage[main] => Class[Apt] => Notify[I love apt!] => Class[Apt] =>
Apt::Source[myrepo] => Notify[Creating my repo #{name}] => Apt::Source[myrepo]
=> Class[My::Repo] => Stage[pre] => Stage[main])
Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle
or GraphViz
notice: Finished catalog run in 0.03 seconds
</pre>
I know that the practice of including a class from a define may be a bad
style(according to the recommended 2.6 styles), but it is a pervasive pattern.
I will basically have to fork someones module b/c of this.
----------------------------------------
Bug #5349: Class inheritance and stages act weirdly
https://projects.puppetlabs.com/issues/5349
Author: R.I. Pienaar
Status: Needs Decision
Priority: Normal
Assignee: Nigel Kersten
Category:
Target version:
Affected Puppet version: 2.6.3
Keywords:
Branch:
Given the code:
<pre>
stage { "first": before => Stage[main] }
class foo {
package{"zsh":
ensure => present
}
}
class bar inherits foo {
notify{"/usr/bin/cowsay 'hello world'":
require => Package["zsh"]
}
}
class{"bar": stage => "first"}
</pre>
This produce
<pre>
err: Could not apply complete catalog: Found dependency cycles in the following
relationships: Package[zsh] => Notify[/usr/bin/cowsay 'hello world'],
Notify[/usr/bin/cowsay 'hello world'] => Package[zsh], Notify[/usr/bin/cowsay
'hello world'] => Class[main]; try using the '--graph' option and open the
'.dot' files in OmniGraffle or GraphViz
</pre>
If I add:
<pre>
class{"foo": stage => "first"}
</pre>
It sorts itself out.
I am not sure what the correct behavior would be, at first I think we should
just pull the inherited class into the 'first' stage as well but I can imagine
that causing weird issues too?
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.