Issue #14337 has been updated by Ken Barber.
So I can't replicate this in an isolated way, I've tried this:
$service_notify = Notify[undef]
$puppet_config = 'foobar'
notify { $puppet_conf: }
if ! defined(Notify[$puppet_conf]) {
notify { $puppet_conf:
message => 'foobar',
require => $service_require,
notify => $service_notify,
}
} else {
Notify<| title == $puppet_conf |> {
notify +> $service_notify,
}
}
And then I've just tried using a really basic example:
puppet apply -e 'file { "/tmp/zzz": content => "", notify => $b }'
No luck.
If you run puppet with --trace, do you see a backtrace? That might be useful to
help me replicate it. Where abouts are you getting this concat module from btw?
----------------------------------------
Refactor #14337: Error message when trying to realise virtual resources where
none exist
https://projects.puppetlabs.com/issues/14337#change-62133
Author: Walter Heck
Status: Needs More Information
Priority: Normal
Assignee:
Category: error reporting
Target version:
Affected Puppet version: 2.7.14
Keywords:
Branch:
I was trying to use the puppetlabs-puppet module when I hit a problem with a
very cryptic error message:
<pre>info: Caching catalog for tribily-stage01.local
err: Failed to apply catalog: Parameter notify failed: No title provided and
"undef" is not a valid resource reference</pre>
Not even a 'puppet agent -tvd' run would give any clue as to what happened. I
ended up disabling and running code over and over to find the culprit.
Somewhere in that module, it is blindly assumed that in the else part of an if
statement, some resources needed to be realised. Problem is: they were not
declared virtual to begin with. Here's the offending statement:
<pre> if ! defined(Concat[$puppet_conf]) {
concat { $puppet_conf:
mode => '0644',
owner => 'puppet',
group => 'puppet',
require => $service_require,
notify => $service_notify,
}
}
else {
Concat<| title == $puppet_conf |> {
require => $service_require,
owner => 'puppet',
group => 'puppet',
notify +> $service_notify,
}
}</pre>
I think it would be beneficial for many if that error message was improved on :)
--
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.