John George
2013-Apr-22 20:53 UTC
[Puppet Users] Hiera error in Puppet: undefined method `empty?''
Hello, I have spent the past several days unsuccessfully trying to get hiera-gpg to work. Can anyone help me understand what I am doing wrong? I am using Puppet Enterprise 2.7.2 (as a proof of concept). Right now, I just have a simple class where I look up a password and display it. I intend to use that password for subsequent operations. class hiera_test { $lookup = hiera("appadminpwd") #Test hiera functionality exec { "hiera_test": command => "curl -s -f -u admin:$lookup http://localhost/configure.html", path => "/usr/bin:/usr/sbin:/bin", } notify { "Password is: $lookup": } } The error I always receive is: err: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `empty?'' for #<Puppet::Util::Log:0x7f137e3566d0> at /etc/puppetlabs/puppet/modules/mod1/manifests/hiera_test.pp:2 on node ireland The error message indicates to me that the lookup from Hiera is failing. The strange part is that I can run hiera from the command line successfully: /opt/puppet/bin# ./hiera appadminpwd apppassword /usr/local/bin# ./hiera appadminpwd apppassword I have a hiera.yaml in /etc/hiera.yaml and also in /etc/puppetlabs/puppet/hiera.yaml. Thanks for any assistance - I did see a similar post a month ago, but there was no resolution. Thanks, 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
John George
2013-Apr-22 20:53 UTC
[Puppet Users] Hiera error in Puppet: undefined method `empty?''
Hello, I have spent the past several days unsuccessfully trying to get hiera-gpg to work. Can anyone help me understand what I am doing wrong? I am using Puppet Enterprise 2.7.2 (as a proof of concept). Right now, I just have a simple class where I look up a password and display it. I intend to use that password for subsequent operations. class hiera_test { $lookup = hiera("appadminpwd") #Test hiera functionality exec { "hiera_test": command => "curl -s -f -u admin:$lookup http://localhost/configure.html", path => "/usr/bin:/usr/sbin:/bin", } notify { "Password is: $lookup": } } The error I always receive is: err: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `empty?'' for #<Puppet::Util::Log:0x7f137e3566d0> at /etc/puppetlabs/puppet/modules/mod1/manifests/hiera_test.pp:2 on node ireland The error message indicates to me that the lookup from Hiera is failing. The strange part is that I can run hiera from the command line successfully: /opt/puppet/bin# ./hiera appadminpwd apppassword /usr/local/bin# ./hiera appadminpwd apppassword I have a hiera.yaml in /etc/hiera.yaml and also in /etc/puppetlabs/puppet/hiera.yaml. Thanks for any assistance - I did see a similar post a month ago, but there was no resolution. Thanks, 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
John George
2013-Apr-22 21:55 UTC
[Puppet Users] Re: Hiera error in Puppet: undefined method `empty?''
I just figured out the error. The keyring had the wrong ownership permissions! I guess writing out the problem can help figure out the issue. Hope this will help someone else save time and effort. On Monday, April 22, 2013 1:53:26 PM UTC-7, John George wrote:> > Hello, > > I have spent the past several days unsuccessfully trying to get hiera-gpg > to work. Can anyone help me understand what I am doing wrong? I am using > Puppet Enterprise 2.7.2 (as a proof of concept). > > Right now, I just have a simple class where I look up a password and > display it. I intend to use that password for subsequent operations. > > class hiera_test { > $lookup = hiera("appadminpwd") > #Test hiera functionality > exec { "hiera_test": > command => "curl -s -f -u admin:$lookup > http://localhost/configure.html", > path => "/usr/bin:/usr/sbin:/bin", > } > > notify { "Password is: $lookup": } > } > > > > The error I always receive is: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > undefined method `empty?'' for #<Puppet::Util::Log:0x7f137e3566d0> at > /etc/puppetlabs/puppet/modules/mod1/manifests/hiera_test.pp:2 on node > ireland > > > > The error message indicates to me that the lookup from Hiera is failing. > > The strange part is that I can run hiera from the command line > successfully: > > /opt/puppet/bin# ./hiera appadminpwd > apppassword > > /usr/local/bin# ./hiera appadminpwd > > apppassword > > > I have a hiera.yaml in /etc/hiera.yaml and also in > /etc/puppetlabs/puppet/hiera.yaml. Thanks for any assistance - I did see a > similar post a month ago, but there was no resolution. > > Thanks, > 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Felix Frank
2013-Apr-29 22:03 UTC
Re: [Puppet Users] Hiera error in Puppet: undefined method `empty?''
Hi John, this is me replying late because I can''t thrawl the list that often. On 04/22/2013 10:53 PM, John George wrote:> > The error message indicates to me that the lookup from Hiera is failing.How so? Anyway, first debugging steps: 1. Does the error disappear when you set $lookup = ''foo'' 2. Does the error disapper when you change the variable name, say $foo hiera(...) 3. Does the error disappear when you comment out the other declarations in the class body? Thanks, Felix -- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Felix Frank
2013-Apr-29 22:03 UTC
Re: [Puppet Users] Re: Hiera error in Puppet: undefined method `empty?''
Oh, didn''t see that at first. Way to go! On 04/22/2013 11:55 PM, John George wrote:> I just figured out the error. The keyring had the wrong ownership > permissions! > > I guess writing out the problem can help figure out the issue. Hope this > will help someone else save time and effort.-- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.