Ask Your Question

class applied to 19 hosts; 3 won't change

asked 2014-11-03 11:38:17 -0500

t-readyroc gravatar image

I have applied a user class to change an existing user's password to 19 hosts. The hash for the class is set as a smart param. Each of the hosts show that the class is applied in the Foreman UI, confirmed by YAML dump. The problem is that 3 of the hosts' passwords won't update. The hosts are a mix of Ubuntu 12.04.5 & 14.04.1. The 3 problem hosts are all 12.04.5.

All three problem hosts have libshadow-ruby1.8 (1.4.1-8build1) installed (the Trusty hosts have ruby-shadow 2.2.0-1). Running

ruby -e "require 'puppet' ; puts Puppet.features.libshadow?"

on the 3 problem hosts returns "false." Running puppet agent in debug mode shows this error on the problem hosts.

So.... why is the class not changing the user's password on 3 of the 19 hosts?

edit retag flag offensive close merge delete


What does `ruby --version` output? It's possible the default Ruby is 1.9 rather than 1.8 (the norm on 12.04), so you'd need libshadow for that, which doesn't appear to be packaged.

domcleal gravatar imagedomcleal ( 2014-11-03 11:55:46 -0500 )edit

All 3 trouble hosts show a ruby version of 2.0.0p451. Do you mean this gem? Also, 2 hosts that _have_ applied the class ok (changed the user's password) are also running ruby 2.0.0p451, have libshadow-ruby1.8 installed, and return "false" to the features query.

t-readyroc gravatar imaget-readyroc ( 2014-11-03 12:31:05 -0500 )edit

This gem: The change in Ruby version is probably why, since the 2.0.0 version of Ruby won't load the libshadow-ruby1.8 package. Installing the gem, or repackaging it is best.

domcleal gravatar imagedomcleal ( 2014-11-04 01:24:00 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-11-04 12:18:25 -0500

t-readyroc gravatar image

The issue on 2 of the hosts stemmed from puppet using ruby 2.0, while the gem environment was actually 1.9.3. I removed 2.0 from those machines & made sure that the ruby-shadow gem was installed.

The third host was ruby2.0 down the board, so simply installing ruby-shadow solved the problem there.

Credit to domcleal for pointing me in the right direction.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-11-03 11:38:17 -0500

Seen: 25 times

Last updated: Nov 04 '14