Issue #5220 has been updated by Andrew Parker.
Status changed from Investigating to Accepted
The behavior around this has been changed by the fix for #15264. The error
message generated is still not that helpful to diagnose the actual error in
this case, but at least it doesn't complain about a method call on Array.
The issue can easily be reproduced by creating a type that is:
<pre>
> cat ~/.puppet/modules/testing/lib/puppet/type/testing.rb
Puppet.newtype(:testing) do
end
</pre>
And then the issue shows up as:
<pre>
> puppet apply -e "testing { h: }"
Error: No set of title patterns matched the title "h".
</pre>
Which before the fix to #15264 was:
<pre>
> puppet apply -e "testing { h: }"
Error: undefined method `merge' for []:Array
</pre>
I'm moving this back into accepted since it has no current activity on it.
----------------------------------------
Bug #5220: when namevar is not specified for a type, error message is
'undefined method `merge' for []:Array'
https://projects.puppetlabs.com/issues/5220#change-68349
Author: Dan Bode
Status: Accepted
Priority: Normal
Assignee:
Category: RAL
Target version:
Affected Puppet version:
Keywords:
Branch:
a more useful message would be helpful.
stack trace:
<pre>
root@puppet:/etc/puppet/modules# puppet apply --trace --debug
tests/openfire.pp
/usr/lib/ruby/1.8/puppet/resource.rb:206:in `to_hash'
/usr/lib/ruby/1.8/puppet/type.rb:1730:in `initialize'
/usr/lib/ruby/1.8/puppet/resource.rb:246:in `new'
/usr/lib/ruby/1.8/puppet/resource.rb:246:in `to_ral'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:553:in `send'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:553:in `to_catalog'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:531:in `each'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:531:in `to_catalog'
/usr/lib/ruby/1.8/puppet/resource/catalog.rb:468:in `to_ral'
/usr/lib/ruby/1.8/puppet/application/apply.rb:118:in `main'
/usr/lib/ruby/1.8/puppet/application/apply.rb:35:in `run_command'
/usr/lib/ruby/1.8/puppet/application.rb:300:in `run'
/usr/lib/ruby/1.8/puppet/application.rb:397:in `exit_on_fail'
/usr/lib/ruby/1.8/puppet/application.rb:300:in `run'
/usr/lib/ruby/1.8/puppet/util/command_line.rb:55:in `execute'
/usr/bin/puppet:4
undefined method `merge' for []:Array
</pre>
--
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.