【问题标题】:AWS OpsWorks cookbook error at s3.rbs3.rb 处的 AWS OpsWorks 说明书错误
【发布时间】:2016-06-04 16:15:44
【问题描述】:

我正在创建一个 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,导致堆栈失败。

我错过了什么?我是 Chef 和 Opsworks 的新手,有什么建议吗?谢谢

【问题讨论】:

  • 与 IMO 的 find 命令无关,但是像这样的纯真空,很难说是哪里出了问题。
  • 这只是 AWS 预配置设置,有点无法调试
  • OpsWorks 有自己的使用 chef 的方式,使用通常的厨师知识并不总是容易调试,ping @coderanger 可能对此有更好的了解

标签: ruby amazon-web-services chef-infra aws-opsworks


【解决方案1】:

您的 S3 存档文件看起来是空的。您可以使用其中包含文件的 S3 存档重试。

【讨论】:

    猜你喜欢
    • 2017-08-04
    • 2013-03-03
    • 2015-02-14
    • 2016-03-12
    • 1970-01-01
    • 2016-11-03
    • 2015-12-17
    • 1970-01-01
    • 2016-12-24
    相关资源
    最近更新 更多