Issue #4560 has been updated by Cody Herriges. Status changed from Investigating to Accepted
Tags get implicitly assigned based on the documentation at http://projects.puppetlabs.com/projects/puppet/wiki/Using_Tags for non-virtual resources properly. When the resource is virtual and inside a define the resource isn't implicitly tagged with the define's resource title. If you explicitly tag the virtual resource within the define it works at expected, getting tagged properly. I have written three acceptance tests at my puppet-acceptance branch, http://github.com/ody/puppet-acceptance/tree/ticket/4560. These are: ticket_4560_virtual_resources_inside_definitions_not_properly_realized_by_tag_explicit.sh ticket_4560_virtual_resources_inside_definitions_not_properly_realized_by_tag_implicit.sh ticket_4560_virtual_resources_inside_definitions_not_properly_realized_by_tag_not_virtual_implicit.sh The first will return 0 and the second will return 10, or EXIT_OK and EXIT_FAILURE. Sorry but the third doesn't have a sane return value as my file parsing/yaml foo isn't currently good enough to validate the catalog after the run of the client. Though you can open the catalog file yourself and verify the proper implicit tagging of a non-virtual resource. ---------------------------------------- Bug #4560: Virtual resources inside definitions not properly realized by tag http://projects.puppetlabs.com/issues/4560 Author: Ian Ward Comfort Status: Accepted Priority: Normal Assigned to: Category: Target version: Affected version: 2.6.1rc2 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 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.
