Issue #6019 has been updated by Charlie Sharpsteen.

Status changed from Accepted to Duplicate
Assignee set to Charlie Sharpsteen

Closing as a duplicate of #5349.

----------------------------------------
Bug #6019: Subclasses don't inherit run stage correctly?
https://projects.puppetlabs.com/issues/6019#change-90991

* Author: Roald van Loon
* Status: Duplicate
* Priority: Normal
* Assignee: Charlie Sharpsteen
* Category: 
* Target version: 
* Affected Puppet version: 
* Keywords: 
* Branch: 
----------------------------------------
Hi,

Seems like subclasses are not automatically placed in the correct run stage, 
when they inherit the stage from a parent.

Consider the following small test manifest;

    stage { second: require => Stage[main] }
    notify { "test": }
    class testsuper {
    
    }
    
    class testsuper::testsub inherits testsuper {
        notify { "this is testsuper::testsub, and my stage is $stage":
            require => Notify["test"]
        }
    }

    class { "testsuper": stage => second }

    node test {
        include testsuper::testsub
    }

This results in the following;

    <snip>
    debug: /Stage[second]/require: requires Stage[main]
    debug: /Stage[main]/Testsuper::Testsub/Notify[this is testsuper::testsub, 
and my stage is second]/require: requires Notify[test]
    <snip>


So apparently, the $stage metaparameter in "testsuper::testsub" is set to 
"second" correctly, but the puppet run still indicates that the notify should 
take place in stage "main".

Looks to me like this is unwanted behavior?

If I change this ...

    class { "testsuper": stage => second }

... into this;

    class { "testsuper::testsub": stage => second }


... then the "testsub" subclass is executed in the correct stage;

    <snip>
    debug: /Stage[second]/require: requires Stage[main]
    debug: /Stage[second]/Testsuper::Testsub/Notify[this is testsuper::testsub, 
and my stage is second]/require: requires Notify[test]
    <snip>


But I assume it's not by design that I have to apply the stage to every 
subclass.



-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to