Issue #8814 has been updated by Noah Diewald.

I signed the CLA and looked at the [[Development_Development_Lifecycle]] page.
----------------------------------------
Bug #8814: fqdn_rand() causes can't convert String into Integer error
https://projects.puppetlabs.com/issues/8814

Author: Noah Diewald
Status: Requires CLA to be signed
Priority: Normal
Assignee: 
Category: functions
Target version: 2.7.x
Affected Puppet version: 2.7.1
Keywords: Ruby 1.9.2
Branch: 


This is occurring in version 2.7.1 and in the master branch. I'm running ruby 
1.9.2p290 on Arch Linux.

The section of my manifest looks like this:

<pre>
  $rand_hour = fqdn_rand(23,5445)
  $rand_minute = fqdn_rand(59,954)
</pre>

>From puppetd, I get:

<pre>
err: Could not retrieve catalog from remote server: Error 400 on SERVER: can't 
convert String into Integer at /etc/puppet/manifests/mymanifest.pp:4 on node 
example.com
</pre>

>From puppetmasterd, I get:

<pre>
err: can't convert String into Integer at /etc/puppet/manifests/mymanifest.pp:4 
on node example.com
</pre>

I tried a number of things, like using only one argument to fqdn_rand() but it 
turns out my version of Ruby's rand function doesn't like string arguments and 
that fqdn_rand's arguments are strings when they reach rand.

I've included a patch that got things working for me.


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