Issue #4560 has been updated by Charlie Sharpsteen.

Category set to compiler
Status changed from Accepted to Duplicate
Assignee set to Charlie Sharpsteen

The root cause of this issue is that automatic tags from classes and defined 
types are propagated to enclosed objects __after__ the compiler finishes 
evaluating collections. Marking as a duplicate of #3845.

----------------------------------------
Bug #4560: Virtual resources inside definitions not properly realized by tag
https://projects.puppetlabs.com/issues/4560#change-90945

* Author: Ian Ward Comfort
* Status: Duplicate
* Priority: Normal
* Assignee: Charlie Sharpsteen
* Category: compiler
* Target version: 
* Affected Puppet version: 0.25.5
* Keywords: realize virtual resource definition tag
* Branch: 
----------------------------------------
This problem bit my production environment, running 0.25.5, but I can reproduce 
the problem with 2.6.1rc2, so I'm filing against that.

Consider this sample manifest:
<pre>
define mydef { @notify { $name: } }
mydef { 'foo': }
Notify<| tag == 'mydef' |>
</pre>

Given the metaparameter documentation for 'tag', I would expect this manifest 
to generate a real notify resource and a message at catalog-run time, but it 
does not.

If the last line is change to `Notify<||>`, to realize all virtual notify 
resources, the notification appears properly.

More curiously, if the definition is changed to `define mydef { @notify { 
$name: tag => 'mydef' } }`, with an explicit tag of the definition name, the 
notification *also* appears properly.


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