Ruby s3.rb处的AWS OpsWorks cookbook错误

Ruby s3.rb处的AWS OpsWorks cookbook错误,ruby,amazon-web-services,chef-infra,aws-opsworks,Ruby,Amazon Web Services,Chef Infra,Aws Opsworks,我正在创建AWS OpsWorks堆栈,然后出现以下错误: [2016-02-23T00:25:05+00:00] INFO: Processing execute[create git repository] action run (opsworks_custom_cookbooks::checkout line 58) ================================================================================ Error

我正在创建AWS OpsWorks堆栈,然后出现以下错误:

[2016-02-23T00:25:05+00:00] INFO: Processing execute[create git repository] action run (opsworks_custom_cookbooks::checkout line 58)

================================================================================
Error executing action `run` on resource 'execute[create git repository]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of find . -type d -name .git -exec rm -rf {} \;; find . -type f -name .gitignore -exec rm -f {} \;; git init; git add .; git config user.name 'AWS OpsWorks'; git config user.email 'root@localhost'; git commit -m 'Create temporary repository from downloaded contents.' ----
STDOUT: Initialized empty Git repository in /tmp/opsworks20160223-1192-1ursi1c/archive.d/.git/
On branch master

Initial commit

nothing to commit
STDERR: 
---- End output of find . -type d -name .git -exec rm -rf {} \;; find . -type f -name .gitignore -exec rm -f {} \;; git init; git add .; git config user.name 'AWS OpsWorks'; git config user.email 'root@localhost'; git commit -m 'Create temporary repository from downloaded contents.' ----
Ran find . -type d -name .git -exec rm -rf {} \;; find . -type f -name .gitignore -exec rm -f {} \;; git init; git add .; git config user.name 'AWS OpsWorks'; git config user.email 'root@localhost'; git commit -m 'Create temporary repository from downloaded contents.' returned 1


Resource Declaration:
---------------------
# In /var/lib/aws/opsworks/cache.stage1/cookbooks/scm_helper/libraries/s3.rb

58:         execute 'create git repository' do
59:           cwd "#{tmpdir}/archive.d"
60:           command "find . -type d -name .git -exec rm -rf {} \\;; find . -type f -name .gitignore -exec rm -f {} \\;; git init; git add .; git config user.name 'AWS OpsWorks'; git config user.email 'root@localhost'; git commit -m 'Create temporary repository from downloaded contents.'"
61:         end
62: 
63:         "#{tmpdir}/archive.d"
64:       end
65:     end



Compiled Resource:
------------------
# Declared in /var/lib/aws/opsworks/cache.stage1/cookbooks/scm_helper/libraries/s3.rb:58:in `prepare_s3_checkouts'

execute("create git repository") do
action "run"
retries 0
retry_delay 2
command "find . -type d -name .git -exec rm -rf {} \\;; find . -type f -name .gitignore -exec rm -f {} \\;; git init; git add .; git config user.name 'AWS OpsWorks'; git config user.email 'root@localhost'; git commit -m 'Create temporary repository from downloaded contents.'"
backup 5
cwd "/tmp/opsworks20160223-1192-1ursi1c/archive.d"
returns 0
cookbook_name "opsworks_custom_cookbooks"
recipe_name "checkout"
end
find
命令出错,返回代码1,导致堆栈失败


我错过了什么?我是厨师和奥普斯沃克斯的新手,有什么建议吗?谢谢

看来您的S3存档文件是空的。您可以再次尝试使用S3 archive,其中包含文件。

与find命令IMO无关,但由于这种纯粹的真空状态,很难说有什么问题。这只是AWS的预配置设置,调试Opsworks不可能有自己的使用chef的方式,使用通常的chef知识调试并不容易,ping@coderanger哪个可能对此有更好的了解