Issue #3845 has been updated by Ryan McKern.

Apologies for the delay, but this was the first chance I had to circle back 
around to this. Yes, it appears that the problem still persists in the 2.6.x 
branch, judging by our own node configuration as well as the test code. With 
puppet 0.25.1, the behavior of the above tagmagic.pp file is:

    [r...@somehost ~]# puppet tagmagic.pp
    notice: I am though
    notice: //foo/Notify[I'm tagged]/message: defined 'message' as 'I am though'
    notice: I'm untagged
    notice: //foo/Notify[I'm untagged]/message: defined 'message' as 'I'm 
untagged'

But using puppet 2.6.2 I receive:

    [r...@anotherhost ~]# puppet tagmagic.pp
    notice: I'm untagged
    notice: /Stage[main]/Foo/Notify[I'm untagged]/message: defined 'message' as 
'I'm untagged'
    notice: I am though
    notice: /Stage[main]/Foo/Notify[I'm tagged]/message: defined 'message' as 
'I am though'

--

As I'm a novice script writer at best (being primarily an operations admin) I'm 
not even sure where to start digging into this. This is blocking our migration 
to 2.6.x from 0.25.1 as we make heavy use of tags in both node and class 
definitions. Even a suggestion as to where to start digging into this would be 
incredibly helpful.
----------------------------------------
Bug #3845: Resources do not inherit class-level tags
https://projects.puppetlabs.com/issues/3845

Author: Jonathan Booth
Status: Accepted
Priority: Normal
Assignee: 
Category: tags
Target version: 
Affected Puppet version: 0.25.4
Keywords: 
Branch: 


Resources (and virtual resources) are not having their classes declared tags 
correctly applied. ("Add the specified tags to the containing class or 
definition. All contained objects will then acquire that tag, also." ref: 
http://docs.puppetlabs.com/references/latest/function.html#tag)

<pre>
class foo {
    tag 'notworking'
    notify { "I'm untagged": }
    notify { "I'm tagged": tag => "notworking" }
}
include foo
Notify <| tag == "notworking" |> { message => "I am though" }
</pre>

Results in:

<pre>
mauve /home/jbooth > puppet tagmagic.pp
notice: I am though
notice: //foo/Notify[I'm tagged]/message: defined 'message' as 'I am though'
notice: I'm untagged
notice: //foo/Notify[I'm untagged]/message: defined 'message' as 'I'm untagged'
</pre>

You can change the 'tag == "foo"' and life doesn't get any better. The neither 
notify gets the message changed.

<pre>
mauve /home/jbooth > tail -1 tagmagic.pp 
Notify <| tag == "foo" |> { message => "I am though" }
mauve /home/jbooth > puppet tagmagic.pp
notice: I'm untagged
notice: //foo/Notify[I'm untagged]/message: defined 'message' as 'I'm untagged'
notice: I'm tagged
notice: //foo/Notify[I'm tagged]/message: defined 'message' as 'I'm tagged'
</pre>


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