OpsWorks Chef 11.10 未定義方法“屬性”

OpsWorks Chef 11.10 未定義方法“屬性”

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 存取實例來取得詳細日誌。

答案1

很確定我在其他地方回答過您,但為了後代,您正在嘗試使用需要 Chef 12 的 Windows 食譜版本,但您正在使用 Chef 11。

相關內容