Issue #16606 has been updated by Henrik Lindberg.

Category set to documentation
Status changed from Investigating to Accepted

The behavior is the same in 3.x

What happens is actually that the tagging splits the input on the :: and it 
becomes this:
<pre>
["zz_tag_bla::yadda", "zz_tag_bla", "yadda", "notify"]
</pre>
Thus, the example above would also match if the collected tag is entered as 
'yadda'.

The reason for this is that tagging.rb has special handling of qualified names 
- it is supposed to turn each name segment into a tag.

So, this is by design. (for reasons I don't know).

Changing this to be a documentation bug. Documentation should state that a 
qualified tags add one tag per segment, and if a match is not wanted on a 
single segment, the selector expression must also use a qualified name (the 
selector does not split the query).

Changing the title to reflect the documentation issue.





----------------------------------------
Bug #16606: realizing virtual resources by tag with double colon :: in name 
gives unexpected results
https://projects.puppetlabs.com/issues/16606#change-74761

Author: Eric Seynaeve
Status: Accepted
Priority: Normal
Assignee: Henrik Lindberg
Category: documentation
Target version: 
Affected Puppet version: 2.7.12
Keywords: virtual resource realize tag
Branch: 


When I run a puppet apply on the following code, it gives unexpected results:
    class ex1 {
      include ex2
      Notify <| tag == 'zz_tag_bla' |>
    }
    class ex2 {
      @notify {"You're a winner":
        tag => 'zz_tag_bla::yadda',
      }
    }
    include ex1

I would expect that the notify would NOT be realized. However, it is.

>From my testing, it seems that the '::' in the tag name causing special 
>interpretations. Nowhere in the documentation I can find why this is.

What's going on here ?

Eric


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