2013-02-25 51 views
1

我是一个蟒蛇小子,正在努力理解ruby stacktraces。如果有人能够告诉我一个系统的方法来深入了解导致这样的信息的底线,我会很感激。运行Opscode 11.4。我认为它可能是由于过时的opscode食谱,所以更新柜0.017 - 最新的。但问题依然存在。我想也许这是另一本食谱的依赖。这是elasticsearch,但没有指定版本。在任何情况下,这种方法看起来都像猜测一样,但是并没有一个明确的堆栈轨迹来显示底层问题。行动这种讯息的正确方法是什么?如何调试opscode chef/ruby​​错误?

Synchronizing Cookbooks: 
    - users 
    - ark 
    - elasticsearch 
    - openssl 
    - sudo 
    - yum 
    - ohai 
    - munin 
    - bluepill 
    - runit 
    - postgresql 
    - build-essential 
    - apt 
    - git 
    - nginx 
Compiling Cookbooks... 

================================================================================ 
Recipe Compile Error in /var/chef/cache/cookbooks/ark/libraries/resource_ark.rb 
================================================================================ 


NoMethodError 
------------- 
undefined method `attribute' for Chef::Resource::Ark:Class 


Cookbook Trace: 
--------------- 
    /var/chef/cache/cookbooks/ark/libraries/resource_ark.rb:37 


Relevant File Content: 
---------------------- 
/var/chef/cache/cookbooks/ark/libraries/resource_ark.rb: 

30:   @allowed_actions.push(:install, :dump, :cherry_pick, :put, :install_with_make, :configure, :setup_py_build, :setup_py_install, :setup_py) 
31:   @action = :install 
32:   @provider = Chef::Provider::Ark 
33:  end 
34: 
35:  attr_accessor :path, :release_file, :prefix_bin, :prefix_root, :home_dir, :extension, :version 
36: 
37>>  attribute :owner, :kind_of => String, :default => 'root' 
38:  attribute :group, :kind_of => [String, Fixnum], :default => 0 
39:  attribute :url, :kind_of => String, :required => true 
40:  attribute :path, :kind_of => String, :default => nil 
41:  attribute :full_path, :kind_of => String, :default => nil 
42:  attribute :append_env_path, :kind_of => [TrueClass, FalseClass], :default => false 
43:  attribute :checksum, :regex => /^[a-zA-Z0-9]{64}$/, :default => nil 
44:  attribute :has_binaries, :kind_of => Array, :default => [] 
45:  attribute :creates, :kind_of => String, :default => nil 
46:  attribute :release_file, :kind_of => String, :default => '' 



[2013-02-25T00:19:30+00:00] ERROR: Running exception handlers 
[2013-02-25T00:19:30+00:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json 
[2013-02-25T00:19:30+00:00] ERROR: Exception handlers complete 
Chef Client failed. 0 resources updated 
[2013-02-25T00:19:30+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out 
[2013-02-25T00:19:30+00:00] FATAL: NoMethodError: undefined method `attribute' for Chef::Resource::Ark:Class 

回答

1

看来,社区网站的版本0.0.17是不一样的,即使它们具有相同的版本号,目前的头。从github https://github.com/opscode-cookbooks/ark/commit/b8c4aaf17d6e88aa857af6b2038eb0dba9981c0b安装源码解决了这个问题。

+0

我们还没有通过测试套件运行。一旦我们这样做,它将被发布到社区网站w /新版本。 – jtimberman 2013-02-25 01:57:33

+2

版本0.1.0发布。 – jtimberman 2013-02-25 15:29:46

+0

谢谢jtimberman – 2013-02-26 07:07:28