About | FAQ | Help
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

undefined method `empty?' for nil:NilClass

Hi,

I am using ...

# puppet -V
3.7.4 (Puppet Enterprise 3.7.2)

... on my puppet master and nodes.

I am getting this error when I run puppet agent -t on my nodes:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `empty?' for nil:NilClass at /etc/puppetlabs/puppet/environments/production/manifests/site.pp:47 on node foo.example.com

Line 47 on my site.pp is this:

 44 # Add Fix For allow_virtual Warning
 45 if versioncmp($::puppetversion,'3.6.1') >= 0 {
 46 
 47   $allow_virtual_packages = hiera('allow_virtual_packages',false)
 48 
 49   Package {
 50     allow_virtual => $allow_virtual_packages,
 51   }
 52 }
 53 #END Add Fix For allow_virtual Warning

I added this bit to my site.pp because I use to get these warning messages ...

Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false. (at /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/type.rb:816:in `set_default')

Can someone point out what I am doing wrong here?

Thanks

undefined method `empty?' for nil:NilClass

Hi,

I am using ...

# puppet -V
3.7.4 (Puppet Enterprise 3.7.2)

... on my puppet master and nodes.

I am getting this error when I run puppet agent -t on my nodes:

Error: Could not retrieve catalog from
  from remote server: Error 400 on SERVER:
  SERVER: undefined method `empty?' for
  for nil:NilClass at
  /etc/puppetlabs/puppet/environments/production/manifests/site.pp:47
  at /etc/puppetlabs/puppet/environments/production/manifests/site.pp:47 on node foo.example.com

foo.example.com

Line 47 on my site.pp is this:

 44 # Add Fix For allow_virtual Warning
 45 if versioncmp($::puppetversion,'3.6.1') >= 0 {
 46 
 47   $allow_virtual_packages = hiera('allow_virtual_packages',false)
 48 
 49   Package {
 50     allow_virtual => $allow_virtual_packages,
 51   }
 52 }
 53 #END Add Fix For allow_virtual Warning

I added this bit to my site.pp because I use to get these warning messages ...

Warning: The package type's
  type's allow_virtual parameter will be
  be changing its default value from false
  false to true in a future release. If you do
  do not want to allow virtual packages,
  packages, please explicitly set allow_virtual to
  to false.    (at
  /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/type.rb:816:in
  `set_default')

(at /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/type.rb:816:in `set_default')

Can someone point out what I am doing wrong here?

Thanks