1

I'm a python guy and struggling to make sense of ruby stacktraces. I'd appreciate if anyone can tell me a systematic method to get to the bottom of what is causing a message like this. Running Opscode 11.4. I thought its probably due to an outdated opscode cookbook, so updated ark to 0.0.17 - the latest. However the problem persists. I thought perhaps it was a dependancy of another cookbook. It is, elasticsearch, however no version is specified. In any case this method seems like guess work however there is not a clear stack trace of where the underlaying problem is. What is the correct way to action such a message?

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 Answer 1

1

Seems that the community site version 0.0.17 is not the same as the current head even though they have the same version number. Installing source from github https://github.com/opscode-cookbooks/ark/commit/b8c4aaf17d6e88aa857af6b2038eb0dba9981c0b solved the problem.

1
  • We haven't run that through the test suite yet. Once we do, it will be released to the community site w/ a new version.
    – jtimberman
    Feb 25, 2013 at 1:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.