aws / opsworks-cookbooks

Chef Cookbooks for the AWS OpsWorks Service
Other
1.05k stars 1.23k forks source link

Persistent compile error in deploy::default #316

Closed jkalbfeld closed 9 years ago

jkalbfeld commented 9 years ago

For the last 24 hours, I have been seeing this. Even with stock deployments, this seems to fail, with zero custom cookbooks. Has anyone run into this error at all with the stock cookbooks?

Recipe Compile Error in /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/recipes/default.rb

ArgumentError

You must supply a name when declaring a group resource

Cookbook Trace:

/var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy_user.rb:4:in block in from_file' /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/recipes/default.rb:5:inblock in from_file' /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/recipes/default.rb:3:in each' /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/recipes/default.rb:3:infrom_file'

Relevant File Content:

/var/lib/aws/opsworks/cache.stage2/cookbooks/deploy/definitions/opsworks_deploy_user.rb:

1: define :opsworks_deploy_user do 2: deploy = params[:deploy_data] 3: 4>> group deploy[:group] 5: 6: user deploy[:user] do 7: action :create 8: comment "deploy user" 9: uid next_free_uid 10: gid deploy[:group] 11: home deploy[:home] 12: supports :manage_home => true 13: shell deploy[:shell]

[2015-06-17T17:15:14+00:00] ERROR: Running exception handlers [2015-06-17T17:15:14+00:00] ERROR: Exception handlers complete [2015-06-17T17:15:14+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out [2015-06-17T17:15:14+00:00] ERROR: You must supply a name when declaring a group resource [2015-06-17T17:15:14+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

workeitel commented 9 years ago

Hey Jonathan,

thanks for your report.

Can you please provide your AWS OpsWorks instance id of the instance you see this problem? This makes it easier to find the cause of the problem.

Thank you Florian

jkalbfeld commented 9 years ago

04152dcb-ffaa-4ce3-afba-a7cb0d215647

jkalbfeld commented 9 years ago

BTW, we are seeing this on multiple stacks that share no application or cookbook code. Some of them have not been modified in months.

jkalbfeld commented 9 years ago

As it turns out, you can't create a cookbook with the name of a reserved cookbook. It will completely obliterate the built-in cookbook. We had one named deploy:: that was confusing the parser on the OpsWorks side.