On Tuesday, May 27, 2014 2:26:51 PM UTC-5, mhoey wrote: > > I recently installed a puppet 3.4.3 puppetmaster. I am working on a > project to convert all of our manifests over from 2.7 to 3.4.3. While > trying to run a master/agent setup on the puppetmaster itself, I am getting > the following error: > > "Error: Could not retrieve catalog from remote server: Error 400 on > SERVER: no implicit conversion of String into Integer." > > The line in question is a call to a custom function. The problem seems to > go back to the "ec2_userdata" facter fact. If I alter the line > "userdata.split" to just "userdata" in > /usr/lib/ruby/vendor_ruby/facter/ec2.rb everything starts to work. What's > interesting is that when I alter my function to not even use this variable > (for debug purposes) it still throws the error. This leads me to believe > that this fact is getting loaded no matter what and ultimately causing the > problem. > >
The custom function is probably the issue. Puppet 2 accepts sloppier custom function definitions; somewhere in the Puppet 3 series puppet started enforcing the rules more rigorously (as I understand it, the rules themselves did not change). Anyway, we really need to see some code to confirm that diagnosis or offer a different one. The custom function (at least its first few lines), the section of the manifest where it is invoked, and the argument values being passed should be sufficient. > I saw in the Facter 2.0.1 documentation that arrays are now accepted but > puppet does not have them turned on by default. I set stringify_facts to > false in both main and master sections of puppet.conf but the problem still > persists. > > I'm sure that's not your issue. Facter's default behavior is the traditional one, so if your code worked Puppet 2 / Facter 1 then it should not be necessary to enable the new structured facts support to make it work in Puppet 3 / Facter 2. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/0cc3f6c2-6082-4e28-be54-1ec8a171cf22%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
