chef-boneyard / knife-oraclecloud

Knife plugin for Oracle Cloud Infrastructure Classic
Apache License 2.0
4 stars 5 forks source link

Compatibility with chef-client 14.0.202 #16

Closed gsaswata closed 6 years ago

gsaswata commented 6 years ago

I am using chef-client version: 14.0.202. When i try to get a list of the servers i get the following exception:

$ knife oraclecloud server list /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:2325:in raise_if_conflicts': Unable to activate knife-oraclecloud-1.2.0, because chef-14.0.202 conflicts with chef (~> 12.0) (Gem::ConflictError) from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1438:inactivate' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:224:in rescue in try_activate' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:217:intry_activate' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:128:in rescue in require' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:39:inrequire' from /home/ops/.chefdk/gem/ruby/2.4.0/gems/knife-oraclecloud-1.2.0/lib/chef/knife/oraclecloud_image_list.rb:21:in <top (required)>' from /home/ops/.chefdk/gem/ruby/2.4.0/gems/chef-14.0.202/lib/chef/knife/core/subcommand_loader.rb:85:inload' from /home/ops/.chefdk/gem/ruby/2.4.0/gems/chef-14.0.202/lib/chef/knife/core/subcommand_loader.rb:85:in block in load_commands' from /home/ops/.chefdk/gem/ruby/2.4.0/gems/chef-14.0.202/lib/chef/knife/core/subcommand_loader.rb:85:ineach' from /home/ops/.chefdk/gem/ruby/2.4.0/gems/chef-14.0.202/lib/chef/knife/core/subcommand_loader.rb:85:in load_commands' from /home/ops/.chefdk/gem/ruby/2.4.0/gems/chef-14.0.202/lib/chef/knife/core/subcommand_loader.rb:95:inload_command' from /home/ops/.chefdk/gem/ruby/2.4.0/gems/chef-14.0.202/lib/chef/knife/core/subcommand_loader.rb:109:in command_class_from' from /home/ops/.chefdk/gem/ruby/2.4.0/gems/chef-14.0.202/lib/chef/knife.rb:152:insubcommand_class_from' from /home/ops/.chefdk/gem/ruby/2.4.0/gems/chef-14.0.202/lib/chef/knife.rb:215:in run' from /home/ops/.chefdk/gem/ruby/2.4.0/gems/chef-14.0.202/lib/chef/application/knife.rb:160:inrun' from /home/ops/.chefdk/gem/ruby/2.4.0/gems/chef-14.0.202/bin/knife:25:in <top (required)>' from /opt/chefdk/embedded/bin/knife:23:inload'

Are there any newer versions of knife-oraclecloud available that support chef-client 14.0.202 ?

jjasghar commented 6 years ago

https://github.com/chef-partners/knife-oraclecloud/blob/master/knife-oraclecloud.gemspec#L22

yep, good catch. If I put up a branch/pr to fix this can you verify it for me? I don't have an oracle cloud to test against anymore.

gsaswata commented 6 years ago

Yes, i can verify that for you. Also, it would be good if you can highlight any changes in the installation instructions as i am pretty much new to ruby.

jjasghar commented 6 years ago

Awesome thank you. And yes it’ll be more involved then the steps right now. I’ll get something together soon and ping you here.

jjasghar commented 6 years ago

@gsaswata https://github.com/chef-partners/knife-oraclecloud/pull/17 please give that a shot.

gsaswata commented 6 years ago

That worked like a charm !! I got the hostname, Orchestration ID, status, shape, Image, and instance ID of the servers in my ID domain.

jjasghar commented 6 years ago

Wonderful. I’ll merge and release today.

gsaswata commented 6 years ago

I uninstalled the previous gem and re-installed it again by running chef gem install knife-oraclecloud . I got the below constraint issue today:

/opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:2325:inraise_if_conflicts': Unable to activate rest-client-1.8.0, because mime-types-3.1 conflicts with mime-types (< 3.0, >= 1.16) (Gem::ConflictError)`

jjasghar commented 6 years ago

I’d delete your .chefdk directory and reinstall the gem.

gsaswata commented 6 years ago

I tried deleting the .chefdk directory and reinstalling the gem by running chef gem install knife-oraclecloud , but i faced the same error. Below is the full trace:

]$ knife oraclecloud server list /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:2325:inraise_if_conflicts': Unable to activate rest-client-1.8.0, because mime-types-3.1 conflicts with mime-types (< 3.0, >= 1.16) (Gem::ConflictError) from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1438:in activate' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1472:inblock in activate_dependencies' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1458:in each' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1458:inactivate_dependencies' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1440:in activate' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1472:inblock in activate_dependencies' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1458:in each' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1458:inactivate_dependencies' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:1440:in activate' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:224:inrescue in try_activate' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems.rb:217:in try_activate' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:128:inrescue in require' from /opt/chefdk/embedded/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:39:in require' from /home/ops/.chefdk/gem/ruby/2.4.0/gems/knife-oraclecloud-2.0.0/lib/chef/knife/oraclecloud_image_list.rb:23:in<top (required)>' from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife/core/subcommand_loader.rb:85:in load' from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife/core/subcommand_loader.rb:85:inblock in load_commands' from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife/core/subcommand_loader.rb:85:in each' from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife/core/subcommand_loader.rb:85:inload_commands' from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife/core/subcommand_loader.rb:95:in load_command' from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife/core/subcommand_loader.rb:109:incommand_class_from' from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife.rb:152:in subcommand_class_from' from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/knife.rb:215:inrun' from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/lib/chef/application/knife.rb:160:in run' from /opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.8.5/bin/knife:25:in<top (required)>' from /opt/chefdk/embedded/bin/knife:23:in load' from /opt/chefdk/embedded/bin/knife:23:in

'`

jjasghar commented 6 years ago

Can you reach out to the Chef Community slack? Someone should be able to help you debug real time there. This isn't a support channel, this is only designed for issues and bugs attached to the specific gem.