chef-user icon indicating copy to clipboard operation
chef-user copied to clipboard

Revert "Provide default value for users array"

Open pavel-d opened this issue 9 years ago • 5 comments

Hi,

This was included in 0.4.* recent release, unfortunately this commit breaks metachef cookbook

==> default: [2015-03-23T15:04:29+00:00] DEBUG: Node assembla loading cookbook metachef's attribute file /tmp/vagrant-chef-3/chef-solo-1/cookbooks/metachef/attributes/default.rb
==> default: [2015-03-23T15:04:29+00:00] DEBUG: Loading Attribute metachef::default
==> default: [2015-03-23T15:04:29+00:00] DEBUG: filtered backtrace of compile error: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/metachef/attributes/default.rb:9:in `[]',/tmp/vagrant-chef-3/chef-solo-1/cookbooks/metachef/attributes/default.rb:9:in `from_file'
==> default: [2015-03-23T15:04:29+00:00] DEBUG: filtered backtrace of compile error: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/metachef/attributes/default.rb:9:in `[]',/tmp/vagrant-chef-3/chef-solo-1/cookbooks/metachef/attributes/default.rb:9:in `from_file'
==> default: [2015-03-23T15:04:29+00:00] DEBUG: backtrace entry for compile error: '/tmp/vagrant-chef-3/chef-solo-1/cookbooks/metachef/attributes/default.rb:9:in `[]''
==> default: [2015-03-23T15:04:29+00:00] DEBUG: Line number of compile error: '9'
==> default: 
==> default: ================================================================================
==> default: Recipe Compile Error in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/metachef/attributes/default.rb
==> default: ================================================================================
==> default: 
==> default: 
==> default: TypeError
==> default: ---------
==> default: can't convert String into Integer
==> default: 
==> default: Cookbook Trace:
==> default: ---------------
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/metachef/attributes/default.rb:9:in `[]'
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/metachef/attributes/default.rb:9:in `from_file'
==> default: 
==> default: 
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/metachef/attributes/default.rb:
==> default: 
==> default: 
==> default:   2:  default[:metachef][:conf_dir] = '/etc/metachef'
==> default:   3:  default[:metachef][:log_dir]  = '/var/log/metachef'
==> default:   4:  default[:metachef][:home_dir] = '/etc/metachef'
==> default:   5:  
==> default:   6:  default[:metachef][:user]     = 'root'
==> default:   7:  
==> default: 
==> default:   8:  # Request user account properties here.
==> default:   9>> default[:users]['root'][:primary_group] = value_for_platform(
==> default:  10:    "openbsd"   => { "default" => "wheel" },
==> default: 
==> default:  11:    "freebsd"   => { "default" => "wheel" },
==> default:  12:    "mac_os_x"  => { "default" => "wheel" },
==> default:  13:    "default"   => "root"
==> default:  14:  )
==> default:  15:  
==> default:  16:  default[:announces] ||= Mash.new
==> default:  17:  
==> default:  18:  default[:discovers] ||= Mash.new
==> default: 
==> default: [2015-03-23T15:04:29+00:00] DEBUG: Re-raising exception: TypeError - can't convert String into Integer
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/metachef/attributes/default.rb:9:in `[]'
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/metachef/attributes/default.rb:9:in `from_file'

pavel-d avatar Mar 23 '15 15:03 pavel-d

@ranjib

pavel-d avatar Mar 25 '15 16:03 pavel-d

@pavel-d i'll need couple of more days, there are other bug fixes that should go as well, related to duplicated resource declartion. so hold on for couple of day :-)

ranjib avatar Mar 26 '15 23:03 ranjib

@ranjib Would be happy if you could merge this PR with you changes as well.

navinkbe7 avatar Feb 04 '16 22:02 navinkbe7

@pavel-d @navinkbe7 is it known whether this is still causing issues?

theckman avatar Dec 19 '16 00:12 theckman

@theckman, no idea, I'm not using these chef recipes anymore

pavel-d avatar Dec 19 '16 22:12 pavel-d