Problems with puppet agent on EL7 systems

222 views
Skip to first unread message

smalderma

unread,
Feb 25, 2015, 4:43:18 PM2/25/15
to puppet...@googlegroups.com
Hi,

I'm working on enabling our environment to support EL7 Linux systems.  We mostly run OracleLinux, but also have CentOS and RHEL.

I've got a CentOS 6 PuppetMaster running Foreman 1.7.2, Puppet 3.6.2 (from puppetlabs repo) doing my provisioning.  I have provisioning working for both Oracle Linux 7 and CentOS 7.  The systems kickstart, install puppet inform Foreman that they're done building and reboot.

After the reboots, the puppet agent on both systems produce this:

Failed to apply catalog: Could not retrieve local facts: undefined method `to_a' for "ens33":String
and
Failed to apply catalog: Could not retrieve local facts: undefined method `to_a' for "ens192":String

I'm at something of a loss as to why.  While I'm new at the EL7 release, I know there have been issues with facter requiring net-tools to be installed....and it is.  Both agents are installed out of EPEL 7 at version 3.6.2 with facter 2.2.  Would anyone happen to have an idea on this?

Thanks for the advice!

smalderma

unread,
Feb 25, 2015, 5:11:31 PM2/25/15
to puppet...@googlegroups.com
I put a paste out there of a puppet --test --debug run if anyone wants to have a look-see - http://pastebin.com/X6rpgCgp

Michael Stahnke

unread,
Mar 1, 2015, 6:35:07 PM3/1/15
to puppet...@googlegroups.com
What does your catalog look like? Could you try basically something empty (no node classification, no custom facts/plugins) and see if it works? We certainly have lots of people running Puppet on EL7. 

red

unread,
Mar 1, 2015, 8:01:44 PM3/1/15
to puppet...@googlegroups.com
ens33 and ens192 are the new style interface names, replacing eth0 eth1 ... 
what do you get if you execute:

facter interfaces

smalderma

unread,
Mar 2, 2015, 10:17:34 AM3/2/15
to puppet...@googlegroups.com
Michael,

Thanks for the reply.  I use Foreman as ENC, and my buildtest boxes are in a host group that applies our basic site-wide puppet classes.  I have set them to not be in a hostgroup and thus not have any classes applied, but the same error persists.  I'm just not sure of what the error even means at this point.

For a while I struggled with getting Foreman to provision the EL7 systems, I have a thread in that list about my issues.  But using virtualbox VMs on my laptop I was able to work through those issues and was able to run puppet successfully on the vboxes I provisioned from the same Centos7 and OL7 source repos and kickstart scripts as I am using on my production foreman server.  The provisioning issues for both OSes were related to the libselinux-ruby package, I had downloaded a Centos iso that didn't have the package to use as my source repo, and in OL7 the package is in a different repo (like RHEL i've heard), so I made a patch [1] to kickstart templates Foreman uses so that the repo gets added/enabled before puppet is installed.

In my virtualbox lab, the only puppet classes I was applying were a static files module that populates /root/.ssh/authorized_keys and example42-puppet + dependencies from the Forge.  On my Produciton Puppetmaster we're using more of example42's modules but mostly out of git, and some are run off my own forks.  The site-wide modules the hostgroup had included the site files, puppet, razorsedge/puppet-vmwaretools, and our nagios agent monitoring wrapper class which is based on example42/puppet-nrpe.

Anyway, all the extras are now excluded and the errors still persist.

[1] https://github.com/theforeman/community-templates/compare/master...salderma:master

smalderma

unread,
Mar 2, 2015, 10:24:05 AM3/2/15
to puppet...@googlegroups.com
Hi Red!

Thanks for the reply, I'm familiar with the new interface labelling, though I'd be hard pressed to translate it with out the docs :)

facter interfaces on both servers produces what one would expect...

[root@buildtest1]# cat /etc/system-release
Oracle Linux Server release 7.0
[root@buildtest1]# facter interfaces
ens192,lo

[root@buildtest2]# cat /etc/system-release
CentOS Linux release 7.0.1406 (Core)
[root@buildtest2]# facter interfaces
ens33,lo

jcbollinger

unread,
Mar 3, 2015, 9:14:12 AM3/3/15
to puppet...@googlegroups.com
In Ruby 1.8.7, the String class has a 'to_a' method.  In Ruby 1.9 and later, it does not.  I am inclined to think, therefore, that the messages mean your Puppet and the Ruby it is running on are mismatched.

Puppet claims compatibility with Ruby 1.8.7, Ruby 1.9.3, and Ruby 2.0.x (and it half claims to support 2.1.x).  If you are using a different Ruby then switch to one of those.  If you have more than one Ruby installed, then look into the possibility that Puppet is running on a different one than you intend, or worse: that it is somehow running on one Ruby, but pulling some components from another.


John

smalderma

unread,
Mar 3, 2015, 3:18:17 PM3/3/15
to puppet...@googlegroups.com
Mr. Bollinger, you sir are the winner!  I just wish I had a prize :)

Not so much a ruby version issue, but your point about the to_a method being removed got me looking into all the facts we've got rolling around, and there just happens to be one fact that uses this call. So I'm off to go repair that, and much appreciate that hint in the right direction!  Someone else mentioned getting rid of custom facts, but it didn't lead me to look at a ruby version issue.

Thanks a bunch to all!
Reply all
Reply to author
Forward
0 new messages