【问题标题】:OpsWorks Chef 11.10 undefined method 'property'OpsWorks Chef 11.10 未定义方法“属性”
【发布时间】:2018-09-02 13:57:13
【问题描述】:

在我们调整实例大小之前,Chef 11.10 运行良好,现在 setup_failed 在启动时带有日志:

NoMethodError
-------------
undefined method `property' for #<Class:0x007f7c97afc100>


Cookbook Trace:
---------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/windows/resources/auto_run.rb:22:in `class_from_file'


Relevant File Content:
----------------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/windows/resources/auto_run.rb:

21:  
22>> property :program_name, String, name_property: true
23:  property :path, String, coerce: proc { |x| x.tr('/', '\\') }
24:  property :args, String
25:  property :root, Symbol,
26:           equal_to: %i(machine user),
27:           default: :machine
28:  
29:  alias_method :program, :path
30:  
31:  action :create do

Berkshelf 版本是3.2.0。我无法通过 SSH 进入实例以获取详细日志。

【问题讨论】:

    标签: chef-infra aws-opsworks


    【解决方案1】:

    您正在尝试使用需要更新版本的 Chef 的食谱。具体来说,我认为该食谱需要 Chef 12.5 或更高版本。

    【讨论】:

    • 有没有办法继续使用 11.10?
    • 当然,请使用与 Chef 11 兼容的旧版食谱。
    猜你喜欢
    • 2017-07-02
    • 2018-01-15
    • 2013-11-25
    • 2015-12-25
    • 1970-01-01
    • 2020-10-08
    • 1970-01-01
    • 2021-03-05
    • 2023-03-02
    相关资源
    最近更新 更多