Hi folks,
First off, let me underline that I'm completely new to Puppet. I'm an 
intermediate Chef user but just changed jobs, and the new place is a Puppet 
shop and I've never touched Puppet in my life. I have not had time to 
acclimatize to it at all, but today my coworker asked me to make some 
changes to running servers. Gotta start somewhere. My being a newbie also 
means I'm not sure what information to give you but I'll try my best.

In addition, we use Vagrant for local testing before pushing to servers, 
this is where the trouble occurs -- during Vagrant provisioning.
We're using this box: 
http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210.box 
(CentOS 6.4)
As far as I can tell, it ships with Puppet 3.1.1.
The host computer -- my laptop -- is OS X 10.10.4, if it matters, and I'm 
using VirtualBox 5.0.
Also using the following Vagrant plugins: vagrant-cachier 1.2.1, 
vagrant-librarian-puppet 0.7.1 and vagrant-share 1.1.3.
Right now I can't use a newer version of the librarian plugin because it 
causes another, completely unrelated error. 0.7.1 is the version my 
coworker uses.

During the Puppet run, I get the following error:
==> centos6: Error: undefined method `<' for :undef:Symbol at 
/tmp/vagrant-puppet/modules-0082ff7071bbf237d9411fcd54aae93c/profile/manifests/my_module.pp:29
 
on node foo.bar.com

This is the corresponding chunk of code:

if $::operatingsystemmajrelease < 7 {
  monit::foo { $webservice:
    app_port    => hiera("${webservice}::http_port",undef,"foo/common"),
    app_uri     => 
hiera("${webservice}::app_uri",undef,"${webservice}/common"),
  }
} else {
  include systemd_mon
  systemd_mon::register { $webservice:
    unit => $webservice,
  }
}

Line 29 is the first one above. We have some CentOS 7 in the infrastructure 
so we need to handle it differently since CentOS 7 switched to systemd, as 
you probably know, hence the above chunk of code.

It looks good to me, and my coworker, who is much more experienced with 
Puppet, also sees nothing wrong with it. Of course that works on his 
machine, so it sounds to me like nothing is indeed wrong with the code, but 
rather with something on my machine, but then again, the error occurs 
during the Puppet run inside the VM so I'm not sure how my machine would 
affect it. My coworker is stumped and obviously I don't know where to 
start. 

All I could find through Google was this: 
https://projects.puppetlabs.com/issues/8783
But it's an ancient ticket and it doesn't look like the same problem, even 
though it's the same error, so I doubt this is helpful.

Could anybody please suggest something to start troubleshooting this? 
Thanks!

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/105e47a4-cca3-42e7-876c-dcaee2685b77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to