Michael Knox
2012-Jun-13 12:40 UTC
[Puppet Users] Hiera - can''t convert Array into String error
Hi, I''ve been moving from extlookup to hiera, and it''s generally gone fairly smoothly, but I''ve run into a problem with one of our defines ... I get this error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: can''t convert Array into String at ... The define uses an exec to install Perl CPAN modules and sets log output based on a hiera lookup. exec{"cpan_load_${title}": < cut …> logoutput => hiera(''cpan_logoutput''), } If I remove that line, everything runs through fine. The yaml for hiera: --- cpan_logoutput: true Any ideas on what could be triggering this error? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Wolf Noble
2012-Jun-13 15:06 UTC
Re: [Puppet Users] Hiera - can''t convert Array into String error
I had some issues with using boolean logic with data being fed to me by hiera. I went for a slightly hacky option of: might help you, might be a BadIdea(™) (untested) class foo::params{ bool_to_be_tempname = hiera(''some_TorF_key_as_a_string'') case bool_to_be_tempname { [tT][rR][uU][eE]: { bool_to_be = true } default: { bool_to_be = false } } } On Jun 13, 2012, at 7:40 AM, Michael Knox wrote:> Hi, > I''ve been moving from extlookup to hiera, and it''s generally gone fairly smoothly, but I''ve run into a problem with one of our defines ... > > I get this error: > err: Could not retrieve catalog from remote server: Error 400 on SERVER: can''t convert Array into String at ... > > The define uses an exec to install Perl CPAN modules and sets log output based on a hiera lookup. > exec{"cpan_load_${title}": > < cut …> > logoutput => hiera(''cpan_logoutput''), > } > > If I remove that line, everything runs through fine. > > The yaml for hiera: > --- > cpan_logoutput: true > > Any ideas on what could be triggering this error? > > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >________________________________ This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Michael Knox
2012-Jun-14 05:51 UTC
Re: [Puppet Users] Hiera - can''t convert Array into String error
Thanks, It appears to be something internal to the hiera function, so I''ll have to go digging in there to find out what''s going on. Cheers On 14/06/2012, at 1:06 AM, Wolf Noble wrote:> I had some issues with using boolean logic with data being fed to me by hiera. I went for a slightly hacky option of: > > might help you, might be a BadIdea(™) > > (untested) > > > class foo::params{ > bool_to_be_tempname = hiera(''some_TorF_key_as_a_string'') > case bool_to_be_tempname { > [tT][rR][uU][eE]: { > bool_to_be = true > } > default: { > bool_to_be = false > } > } > } > > > On Jun 13, 2012, at 7:40 AM, Michael Knox wrote: > >> Hi, >> I''ve been moving from extlookup to hiera, and it''s generally gone fairly smoothly, but I''ve run into a problem with one of our defines ... >> >> I get this error: >> err: Could not retrieve catalog from remote server: Error 400 on SERVER: can''t convert Array into String at ... >> >> The define uses an exec to install Perl CPAN modules and sets log output based on a hiera lookup. >> exec{"cpan_load_${title}": >> < cut …> >> logoutput => hiera(''cpan_logoutput''), >> } >> >> If I remove that line, everything runs through fine. >> >> The yaml for hiera: >> --- >> cpan_logoutput: true >> >> Any ideas on what could be triggering this error? >> >> >> -- >> You received this message because you are subscribed to the Google Groups "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. >> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >> > > > ________________________________ > > This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Kelsey Hightower
2012-Jun-25 13:48 UTC
Re: [Puppet Users] Hiera - can''t convert Array into String error
On Thursday, June 14, 2012 1:51:45 AM UTC-4, Mike wrote:> > Thanks, > It appears to be something internal to the hiera function, so I''ll have to > go digging in there to find out what''s going on. > > CheersAre you in position to **test** the 1.0rc branches of hiera and hiera-puppet?> > On 14/06/2012, at 1:06 AM, Wolf Noble wrote: > > > I had some issues with using boolean logic with data being fed to me by > hiera. I went for a slightly hacky option of: > > > > might help you, might be a BadIdea(™) > > > > (untested) > > > > > > class foo::params{ > > bool_to_be_tempname = hiera(''some_TorF_key_as_a_string'') > > case bool_to_be_tempname { > > [tT][rR][uU][eE]: { > > bool_to_be = true > > } > > default: { > > bool_to_be = false > > } > > } > > } > > > > > > On Jun 13, 2012, at 7:40 AM, Michael Knox wrote: > > > >> Hi, > >> I''ve been moving from extlookup to hiera, and it''s generally gone > fairly smoothly, but I''ve run into a problem with one of our defines ... > >> > >> I get this error: > >> err: Could not retrieve catalog from remote server: Error 400 on > SERVER: can''t convert Array into String at ... > >> > >> The define uses an exec to install Perl CPAN modules and sets log > output based on a hiera lookup. > >> exec{"cpan_load_${title}": > >> < cut …> > >> logoutput => hiera(''cpan_logoutput''), > >> } > >> > >> If I remove that line, everything runs through fine. > >> > >> The yaml for hiera: > >> --- > >> cpan_logoutput: true > >> > >> Any ideas on what could be triggering this error? > >> > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > >> To post to this group, send email to puppet-users@googlegroups.com. > >> To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > >> For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >> > > > > > > ________________________________ > > > > This message may contain confidential or privileged information. If you > are not the intended recipient, please advise us immediately and delete > this message. See http://www.datapipe.com/legal/email_disclaimer/ for > further information on confidentiality and the risks of non-secure > electronic communication. If you cannot access these links, please notify > us by reply message and we will send the contents to you. > > > > -- > > You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/2GdyZeaN6DoJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Michael Knox
2012-Jun-26 05:14 UTC
Re: [Puppet Users] Hiera - can''t convert Array into String error
On 25/06/2012, at 11:48 PM, Kelsey Hightower wrote:> On Thursday, June 14, 2012 1:51:45 AM UTC-4, Mike wrote: > Thanks, > It appears to be something internal to the hiera function, so I''ll have to go digging in there to find out what''s going on. > > Cheers > > Are you in position to **test** the 1.0rc branches of hiera and hiera-puppet?Just tried them, unfortunately I got exactly the same error…. err: Could not retrieve catalog from remote server: Error 400 on SERVER: can''t convert Array into String at --trace on the client (using puppet agent) hasn''t given me anything useful. I can extract the data using on the server using hiera, so it would seem to be something in the puppet functions. Hopefully I''ll be able to spend some time and look at the functions in a bit more detail soon.> > > On 14/06/2012, at 1:06 AM, Wolf Noble wrote: > > > I had some issues with using boolean logic with data being fed to me by hiera. I went for a slightly hacky option of: > > > > might help you, might be a BadIdea(™) > > > > (untested) > > > > > > class foo::params{ > > bool_to_be_tempname = hiera(''some_TorF_key_as_a_string'') > > case bool_to_be_tempname { > > [tT][rR][uU][eE]: { > > bool_to_be = true > > } > > default: { > > bool_to_be = false > > } > > } > > } > > > > > > On Jun 13, 2012, at 7:40 AM, Michael Knox wrote: > > > >> Hi, > >> I''ve been moving from extlookup to hiera, and it''s generally gone fairly smoothly, but I''ve run into a problem with one of our defines ... > >> > >> I get this error: > >> err: Could not retrieve catalog from remote server: Error 400 on SERVER: can''t convert Array into String at ... > >> > >> The define uses an exec to install Perl CPAN modules and sets log output based on a hiera lookup. > >> exec{"cpan_load_${title}": > >> < cut …> > >> logoutput => hiera(''cpan_logoutput''), > >> } > >> > >> If I remove that line, everything runs through fine. > >> > >> The yaml for hiera: > >> --- > >> cpan_logoutput: true > >> > >> Any ideas on what could be triggering this error? > >> > >> > >> -- > >> You received this message because you are subscribed to the Google Groups "Puppet Users" group. > >> To post to this group, send email to puppet-users@googlegroups.com. > >> To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > >> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >> > > > > > > ________________________________ > > > > This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. > > > > -- > > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > > > > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/2GdyZeaN6DoJ. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.