Issue #5349 has been updated by Peter Meier.

Nigel Kersten wrote:
> I think I'm leaning towards us pulling the parent class into the stage if 
> undefined.

yes, I would favor that. The current behavior prevents the usage of stages in a 
lot of cases and is quite nasty... :/ So getting here some priority might also 
be nice...

> Does it also seem reasonable to throw an error if you attempt to set a parent 
> and child class to have two different stages explicitly?

Yes.
----------------------------------------
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.

Reply via email to