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

Uninitialized Attributes top level causes error

Open atz opened this issue 12 years ago • 2 comments

[2012-11-01T03:02:10+00:00] INFO: Storing updated cookbooks/user/attributes/default.rb in the cache.

Recipe Compile Error in /var/chef/cache/cookbooks/user/attributes/default.rb

IndexError

string not matched

Cookbook Trace:

/var/chef/cache/cookbooks/user/attributes/default.rb:24:in []=' /var/chef/cache/cookbooks/user/attributes/default.rb:24:infrom_file'

Relevant File Content:

/var/chef/cache/cookbooks/user/attributes/default.rb:

19: # limitations under the License. 20: # 21: 22: case platform 23: when 'debian','ubuntu','redhat','centos','amazon','scientific','fedora','freebsd','suse' 24>> default['user']['home_root'] = "/home" 25: default['user']['default_shell'] = "/bin/bash" 26: when 'openbsd' 27: default['user']['home_root'] = "/home" 28: default['user']['default_shell'] = "/bin/ksh" 29: when 'mac_os_x', 'mac_os_x_server' 30: default['user']['home_root'] = "/Users" 31: default['user']['default_shell'] = "/bin/bash" 32: else 33: default['user']['home_root'] = "/home"

[2012-11-01T03:02:10+00:00] ERROR: Running exception handlers [2012-11-01T03:02:10+00:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json [2012-11-01T03:02:10+00:00] ERROR: Exception handlers complete [2012-11-01T03:02:10+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [2012-11-01T03:02:10+00:00] FATAL: IndexError: string not matched

atz avatar Nov 01 '12 03:11 atz

chef should autovivify the attributes. I'll try to reproduce this. ideally we should not need to initialize the parent attribute

ranjib avatar Mar 21 '15 19:03 ranjib

@atz I've just become a collaborator on this project and I'm looking at old tickets. Are you still having issues with this? Are you able to provide some steps to reproduce the problem?

theckman avatar Nov 05 '16 09:11 theckman