AWS opsworksを利用して、chefのコードを実行しています。
chefリポジトリ内は以下のようなcookbook構成になっています。
cookbook----apache--recipes-------default.rb
| ∟templates-----httpd.conf.erb
| ・
| ・
| ・
∟-mysql--recipes---------default.rb
| ∟templates-----aaa.sql.erb
| ・
| ・
| ・
∟-shell--recipes---------default.rb
∟templates-------bbb.sh.erb
・
・
・
opswoeksコンソールより、Layerのsetupイベントに、apache::default,mysql::default,shell::default
を設定し、対象のEC2を再起動しました。
その結果、setup_failedになってしまい、解決策を知りたいです。
ログには以下のように出力されています。
[2016-12-04T18:46:48+09:00] INFO: Running queued delayed notifications before re-raising exception
[2016-12-04T18:46:48+09:00] ERROR: Running exception handlers
[2016-12-04T18:46:48+09:00] ERROR: Exception handlers complete
[2016-12-04T18:46:48+09:00] FATAL: Stacktrace dumped to /var/chef/runs/6b3c356d-33f3-4efe-b046-c6b0c84e0e22/local-mode-cache/cache/chef-stacktrace.out
[2016-12-04T18:46:48+09:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-12-04T18:46:48+09:00] ERROR: template[bbb.sh.erb] (shell::default line 48) had an error: Chef::Exceptions::FileNotFound: Cookbook 'xxxxx' (0.1.0) does not contain a file at any of these locations:
templates/amazon-2016.09/bbb.sh.erb
templates/amazon/bbb.sh.erb
templates/default/bbb.sh.erb
templates/bbb.sh.erbThis cookbook does contain: ['/var/chef/runs/6b3c356d-33f3-4efe-b046-c6b0c84e0e22/local-mode-cache/cache/cookbooks/xxxxxx/templates/default/httpd.conf.erb','/var/chef/runs/6b3c356d-33f3-4efe-b046-c6b0c84e0e22/local-mode-cache/cache/cookbooks/xxxxx/templates/default/aaa.sql.erb']
[2016-12-04T18:46:49+09:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
chefリポジトリ上、templates/default/bbb.sh.erbは存在するにもかかわらず、bbb.sh.erbが存在しないようなエラーとなっています。
/var/chef/runs/6b3c356d-33f3-4efe-b046-c6b0c84e0e22/local-mode-cache/cache/cookbooks/xxxxxx/templates/default/配下も確認し、bbb.sh.erbが存在していることも確認しました。
しかし、bbb.sh.erbがchefからは見えていないようです。
・本件の原因、解決策
・調査のために必要な情報
・似たような事象に遭遇した時の対処法
などお判りになる方、お教えいただけないでしょうか?
どうぞ宜しくお願いします!!
あなたの回答
tips
プレビュー