pam recipe failing with chef client > 12.8.1 #112

Closed
rljohnsn opened this Issue Apr 18, 2016 · 4 comments

Comments

Projects
None yet
1 participant
@rljohnsn
Contributor

rljohnsn commented Apr 18, 2016

OS image: Amazon Linux AMI release 2015.09 (ami-f0091d91)
chef-solo: 12.9.38
ohai: 8.14.0
chef-solo log: https://gist.github.com/rljohnsn/36cdf0e8525f5113a56afd8a69c85cfc
ohai output: https://gist.github.com/rljohnsn/8cd4b428e73c3d465376b072183787ba

Some where along the way, it appears, the node attributes are wonky on Amazon Linux Image
node['packages']['pam_ccreds'] attribute get set to JSON of the package ohai output.

{"version"=>"10", "release"=>"4.9.amzn1"}

@rljohnsn rljohnsn changed the title from pam reci to pam recipe failing on amazon linux image Apr 18, 2016

@rljohnsn

This comment has been minimized.

Show comment
Hide comment
@rljohnsn

rljohnsn Apr 18, 2016

Contributor

I hacked in some log outputs at the top of pam.rb to verify the attributes being used in the recipe:

Chef::Log.warn("platform_family: #{node['platform_family']}")
Chef::Log.warn("packages:pam_ccreds: #{node['packages']['pam_ccreds']}")
Contributor

rljohnsn commented Apr 18, 2016

I hacked in some log outputs at the top of pam.rb to verify the attributes being used in the recipe:

Chef::Log.warn("platform_family: #{node['platform_family']}")
Chef::Log.warn("packages:pam_ccreds: #{node['packages']['pam_ccreds']}")
@rljohnsn

This comment has been minimized.

Show comment
Hide comment
@rljohnsn

rljohnsn Apr 20, 2016

Contributor

Beginning to wonder if it's actually the latest Chef Client version. Seeing the same behavior on a different distro. Additionally first run of chef works, successive runs get similar errors to the above.

OS Image: Centos 6.7
chef-solo: 12.9.38
ohai: 8.14.0
chef-solo log: https://gist.github.com/rljohnsn/60cacdc8e39ffacbd997036555339b5e

Contributor

rljohnsn commented Apr 20, 2016

Beginning to wonder if it's actually the latest Chef Client version. Seeing the same behavior on a different distro. Additionally first run of chef works, successive runs get similar errors to the above.

OS Image: Centos 6.7
chef-solo: 12.9.38
ohai: 8.14.0
chef-solo log: https://gist.github.com/rljohnsn/60cacdc8e39ffacbd997036555339b5e

@rljohnsn

This comment has been minimized.

Show comment
Hide comment
@rljohnsn

rljohnsn Apr 20, 2016

Contributor

Forcing previous version of chef-solo and the errors go away.
chef-solo: 12.8.1 works.
Test kitchen config to lock into a specific version of chef-solo

provisioner:
  name: chef_solo
  require_chef_omnibus: 12.8.1 

Packer.io config for installing a specific chef version

  "provisioners" : [
    { "type": "chef-solo",
      "skip_install": false,
      "install_command": "curl -L https://www.chef.io/chef/install.sh | {{if .Sudo}}sudo{{end}} bash -s -- -v 12.8.1",
...
<snip>
Contributor

rljohnsn commented Apr 20, 2016

Forcing previous version of chef-solo and the errors go away.
chef-solo: 12.8.1 works.
Test kitchen config to lock into a specific version of chef-solo

provisioner:
  name: chef_solo
  require_chef_omnibus: 12.8.1 

Packer.io config for installing a specific chef version

  "provisioners" : [
    { "type": "chef-solo",
      "skip_install": false,
      "install_command": "curl -L https://www.chef.io/chef/install.sh | {{if .Sudo}}sudo{{end}} bash -s -- -v 12.8.1",
...
<snip>

@rljohnsn rljohnsn changed the title from pam recipe failing on amazon linux image to pam recipe failing with chef client > 12.8.1 Apr 20, 2016

@rljohnsn rljohnsn closed this Apr 20, 2016

@rljohnsn

This comment has been minimized.

Show comment
Hide comment
Contributor

rljohnsn commented Apr 20, 2016

rollbrettler pushed a commit to rollbrettler/chef-os-hardening that referenced this issue Sep 16, 2016

Merge pull request #112 from elijah/patch-1
Add conditional to cover systemd in Ubuntu 15.04+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment