Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialized Attributes top level causes error #24

Open
atz opened this issue Nov 1, 2012 · 2 comments
Open

Uninitialized Attributes top level causes error #24

atz opened this issue Nov 1, 2012 · 2 comments

Comments

@atz
Copy link

atz commented Nov 1, 2012

[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 added a commit to atz/chef-user that referenced this issue Nov 5, 2012
@ranjib
Copy link
Collaborator

ranjib commented Mar 21, 2015

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

@theckman
Copy link
Collaborator

theckman commented Nov 5, 2016

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants