Issue #22740 has been reported by Zachary Stern.
----------------------------------------
Bug #22740: create_resources() fails with empty hash under Ruby 1.9.3
https://projects.puppetlabs.com/issues/22740
* Author: Zachary Stern
* Status: Unreviewed
* Priority: Normal
* Assignee:
* Category:
* Target version:
* Affected Puppet version:
* Keywords: customer
* Branch:
----------------------------------------
Due to the change in the way strings are handled in relation to the enumerable
module in Ruby 1.9.3 vs Ruby 1.8.7
zachary-puppetbot :: ~/testing/1.8.7 % pry
[1] pry(main)> 'foo'.each
=> #<Enumerable::Enumerator:0x1031c6f20>
zachary-puppetbot :: ~/testing/1.9.3 % pry
[1] pry(main)> 'foo'.each
NoMethodError: undefined method `each' for "foo":String
from (pry):1:in `__pry__'
there is a regression in the `create_resources()` function.
When Puppet is run with Ruby 1.8.7, the following code runs without error, with
`$foo` undefined:
create_resources(user, $foo)
Under Ruby 1.9.3, the following error occours during a run:
Error: Could not retrieve catalog from remote server: Error 400 on
SERVER: undefined method `each' for "":String at
/etc/puppetlabs/puppet/manifests/site.pp:45 on node
pe-301-master.puppetdebug.vlan
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Given that this is an inherent change in ruby's behavior, it might be
impossible (or unwise) to restore the original behavior. That being said, we
should at least catch the error, since the above is not very helpful to Puppet
users.
I've submitted a pull request to that effect:
<https://github.com/puppetlabs/puppet/pull/1956>
--
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.
For more options, visit https://groups.google.com/groups/opt_out.