Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knife-spork issue on chef master #140

Open
lamont-granquist opened this issue Aug 23, 2014 · 6 comments
Open

knife-spork issue on chef master #140

lamont-granquist opened this issue Aug 23, 2014 · 6 comments

Comments

@lamont-granquist
Copy link
Contributor

rolling back to 11.14.6 fixes this, not sure if we broke something, or knife-spork needs fixes for chef-12.

i'm out of coffee, so dropping this here to see if you have any time to take a look...

the chef-12.0.0.alpha.1 version is the one off of rubygems.

uploading cookbook to chef server...
/Users/lamont/.rvm/gems/ruby-2.1.2/gems/chef-12.0.0.alpha.1/lib/chef/cookbook_uploader.rb:41:in `[]': no implicit conversion of Symbol into Integer (TypeError)
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/chef-12.0.0.alpha.1/lib/chef/cookbook_uploader.rb:41:in `initialize'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/knife-spork-1.4.1/lib/chef/knife/spork-upload.rb:87:in `new'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/knife-spork-1.4.1/lib/chef/knife/spork-upload.rb:87:in `block in upload'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/knife-spork-1.4.1/lib/chef/knife/spork-upload.rb:83:in `each'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/knife-spork-1.4.1/lib/chef/knife/spork-upload.rb:83:in `upload'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/knife-spork-1.4.1/lib/chef/knife/spork-upload.rb:68:in `run'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/chef-12.0.0.alpha.1/lib/chef/knife.rb:491:in `block in run_with_pretty_exceptions'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/chef-12.0.0.alpha.1/lib/chef/local_mode.rb:38:in `with_server_connectivity'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/chef-12.0.0.alpha.1/lib/chef/knife.rb:490:in `run_with_pretty_exceptions'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/chef-12.0.0.alpha.1/lib/chef/knife.rb:175:in `run'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/chef-12.0.0.alpha.1/lib/chef/application/knife.rb:138:in `run'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/chef-12.0.0.alpha.1/bin/knife:25:in `<top (required)>'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/bin/knife:23:in `load'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/bin/knife:23:in `<main>'
/Users/lamont/bin/cookbook:78:in `push': knife spork upload failed (RuntimeError)
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/lamont/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/lamont/bin/cookbook:83:in `<main>'
@sethdmoore
Copy link

I'm experiencing this as well

ruby -d $(which knife) spork upload collectd

/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/cookbook/cookbook_version_loader.rb:135: warning: instance variable @frozen not initialized
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config.rb:346: warning: instance variable @config_strict_mode not initialized
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config.rb:346: warning: instance variable @config_strict_mode not initialized
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config.rb:346: warning: instance variable @config_strict_mode not initialized
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config.rb:346: warning: instance variable @config_strict_mode not initialized
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config.rb:346: warning: instance variable @config_strict_mode not initialized
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config.rb:346: warning: instance variable @config_strict_mode not initialized
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config.rb:346: warning: instance variable @config_strict_mode not initialized
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config.rb:346: warning: instance variable @config_strict_mode not initialized
Exception `TypeError' at /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config/configurable.rb:53 - can't dup Symbol
Exception `TypeError' at /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config/configurable.rb:53 - can't dup FalseClass
Exception `TypeError' at /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config/configurable.rb:53 - can't dup Symbol
Exception `TypeError' at /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config/configurable.rb:53 - can't dup NilClass
Exception `TypeError' at /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config/configurable.rb:53 - can't dup FalseClass
Exception `TypeError' at /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config/configurable.rb:53 - can't dup FalseClass
Exception `TypeError' at /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config/configurable.rb:53 - can't dup FalseClass
Exception `TypeError' at /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config/configurable.rb:53 - can't dup FalseClass
Exception `TypeError' at /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config/configurable.rb:53 - can't dup NilClass
Exception `TypeError' at /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config/configurable.rb:53 - can't dup NilClass
Exception `TypeError' at /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config/configurable.rb:53 - can't dup Fixnum
Exception `TypeError' at /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config/configurable.rb:53 - can't dup Fixnum
Exception `OpenSSL::SSL::SSLErrorWaitReadable' at /opt/chefdk/embedded/lib/ruby/2.1.0/openssl/buffering.rb:182 - read would block
Exception `OpenSSL::SSL::SSLErrorWaitReadable' at /opt/chefdk/embedded/lib/ruby/2.1.0/openssl/buffering.rb:182 - read would block
Exception `OpenSSL::SSL::SSLErrorWaitReadable' at /opt/chefdk/embedded/lib/ruby/2.1.0/openssl/buffering.rb:182 - read would block
Exception `OpenSSL::SSL::SSLErrorWaitReadable' at /opt/chefdk/embedded/lib/ruby/2.1.0/openssl/buffering.rb:182 - read would block
Exception `OpenSSL::SSL::SSLErrorWaitReadable' at /opt/chefdk/embedded/lib/ruby/2.1.0/openssl/buffering.rb:182 - read would block
Exception `OpenSSL::SSL::SSLErrorWaitReadable' at /opt/chefdk/embedded/lib/ruby/2.1.0/openssl/buffering.rb:182 - read would block
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.1.0/lib/ffi_yajl/parser.rb:63: warning: instance variable key not initialized
Exception `TypeError' at /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/cookbook_uploader.rb:41 - no implicit conversion of Symbol into Integer
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.0.0.alpha.1/lib/chef/local_mode.rb:77: warning: instance variable @chef_zero_server not initialized
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config.rb:346: warning: instance variable @config_strict_mode not initialized
/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/mixlib-config-2.1.0/lib/mixlib/config.rb:346: warning: instance variable @config_strict_mode not initialized
ERROR: TypeError: no implicit conversion of Symbol into Integer

@lamont-granquist
Copy link
Contributor Author

Do you have /opt/chefdk/embedded/bin in your PATH first before /opt/chefdk/bin?

@sethdmoore
Copy link

Yes,
echo $PATH

/opt/chefdk/embedded/bin:/Users/<user>/.chefdk/gem/ruby/2.1.0/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

Is this correct...?

@lamont-granquist
Copy link
Contributor Author

nope. that is why you're picking up chef-12. you should be using /opt/chefdk/bin instead -- or at the very least you should have that before the embedded path.

jordane added a commit to jordane/knife-spork that referenced this issue Sep 30, 2014
@jordane
Copy link
Contributor

jordane commented Sep 30, 2014

This was caused by a change to CookbookUploader's arguments -- it no longer accepts a path, just opts.

jordane added a commit to jordane/knife-spork that referenced this issue Sep 30, 2014
@lamont-granquist
Copy link
Contributor Author

should probably have put this comment here:

opts isn't the Chef::Config its the opts for the CookbookUploader, you should be explicit about
mapping the correct config items into the correct opts. just looking at dan's patch it looks like
you can drop the second argument entirely, but you need to make sure that the Chef::VERSION
is chef-12 (you can use .to_f / .to_i or Gem::Version for comparison). presumably if you go back
far enough in time along the chef-11 branch you'll find where you need that second argument
and you don't want to break that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants