Issue #7928 has been updated by Felix Frank.

Hi Jesse, excellent question.
<pre>
define my_notify() { notify { $name: }}
define my_exec() { exec { $name: refreshonly => true } }

schedule { "not-ever": period => "never" }

notify { "me-first": }

exec { [ "notify-me", "notify-me-wrapped" ]:
        command => "/bin/echo foo",
        refreshonly => true;
}

class schedule_test {
        notify { "not supposed": schedule => "not-ever" }
        my_notify { "not supposed either": schedule => "not-ever" }
}

class loglevel_test {
        notify { "invisible": loglevel => "debug" }
        my_notify { "invisible too": loglevel => "debug" }
}
class before_test {
        notify { "me-firster": before => Notify["me-first"] }
        my_notify { "me-firstes": before => Notify["me-first"] }
}

class require_test {
        notify { "me-later": require => Notify["me-first"] }
        my_notify { "me-latest": require => Notify["me-first"] }
}

class subscribe_test {
        exec { "/bin/echo i shall run":
                        subscribe => Notify["me-first"];
        }
        my_exec {
                "/bin/echo i shall run too":
                        subscribe => Notify["me-first"];
        }
}

class notify_test {
        notify { "i cause a run": notify => Exec["notify-me"] }
        my_notify { "i cause a run too": notify => Exec["notify-me-wrapped"] }
}

include schedule_test
include loglevel_test
include before_test
include require_test
include subscribe_test
include notify_test
</pre>

Require and before appear to work perfectly well.

As for notify and subscribe, well:
<pre>
puppet apply test.pp | egrep Trigger\|executed
notice: /Stage[main]//Exec[notify-me-wrapped]: Triggered 'refresh' from 1 events
notice: /Stage[main]//Exec[notify-me]: Triggered 'refresh' from 1 events
notice: /Stage[main]/Subscribe_test/My_exec[/bin/echo i shall run 
too]/Exec[/bin/echo i shall run too]: Triggered 'refresh' from 1 events
notice: /Stage[main]/Subscribe_test/Exec[/bin/echo i shall run]/returns: 
executed successfully
notice: /Stage[main]/Subscribe_test/Exec[/bin/echo i shall run]: Triggered 
'refresh' from 1 events
</pre>
Not how everything is triggered, but the only exec that actually **runs** is 
the one that isn't wrapped and subscribes.

However, this is consistent with 0.25.5 behaviour:
<pre>
puppet test.pp  | egrep Trigger\|executed
notice: //subscribe_test/Exec[/bin/echo i shall run]/returns: executed 
successfully
notice: //subscribe_test/Exec[/bin/echo i shall run]: Triggering 'refresh' from 
1 dependencies
notice: //subscribe_test/My_exec[/bin/echo i shall run too]/Exec[/bin/echo i 
shall run too]: Triggering 'refresh' from 1 dependencies
notice: //Exec[notify-me-wrapped]: Triggering 'refresh' from 1 dependencies
notice: //Exec[notify-me]: Triggering 'refresh' from 1 dependencies
</pre>

Summarizing:
- before and require are unaffected
- notify and subscribe seem to have been broken for a while, and possibly more 
severely? [unless I'm misreading this]
- loglevel and schedule are afflicted by a regression

On a sidenote, I tried and bisected this, but the git history is apparently 
horrible - 90% of the checkouts wouldn't work for one reason or another, so I 
gave up.
----------------------------------------
Bug #7928: Metaparameters are not expanded to resources inside defines
https://projects.puppetlabs.com/issues/7928

Author: Felix Frank
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: metaparameter, define, schedule, loglevel
Branch: 


This is apparently a 2.6 regression. Consider the following manifest:
<pre>
define my_notify() { notify { $name: }}

schedule { "not-ever": period => "never" }

class schedule_test {
        notify { "not supposed": schedule => "not-ever" }
        my_notify { "not supposed either": schedule => "not-ever" }
}

class loglevel_test {
        notify { "invisible": loglevel => "debug" }
        my_notify { "invisible too": loglevel => "debug" }
}

include schedule_test
include loglevel_test
</pre>

It's not supposed to generate any notifies, ever, which holds true for 0.25.5.

With 2.6.8, it consistently displays both the wrapped notifies.


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