简体   繁体   English

s3.rb处的AWS OpsWorks Cookbook错误

[英]AWS OpsWorks cookbook error at s3.rb

I was creating an AWS OpsWorks stack and then got this 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

There's something wrong about the find command that it returns code 1 which makes the stack failed. find命令返回代码1导致堆栈失败,这是有问题的。

What am I missing? 我想念什么? I'm new to Chef and Opsworks, any advice? 我是Chef和Opsworks的新手,有什么建议吗? Thanks 谢谢

It looks your S3 archive file is empty. 看来您的S3存档文件为空。 You may try again with S3 archive with files inside it. 您可以使用其中包含文件的S3存档重试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM