chef / chef

Chef Infra, a powerful automation platform that transforms infrastructure into code automating how infrastructure is configured, deployed and managed across any environment, at any scale
http://www.chef.io/chef/
Apache License 2.0
7.58k stars 2.51k forks source link

Could not load the 'chef-solo' provisioner from the load path #4159

Closed hlx98007 closed 8 years ago

hlx98007 commented 8 years ago

I have this weird problem that Googling does not give me an answer.

I have freshly installed ChefDK and Chef Client on my CentOS 7 workstation, downloaded the starter kit and modified .kitchen.yml to follows:


---
driver:
  name: opennebula
  opennebula_endpoint: http://10.1.1.1/zonea
  oneauth_file: /home/local/.one/one_auth
  template_name: CHEF-TESTVM
  vm_hostname: CHEF-TESTVM-FRONT-END
  public_key_path: /home/local/.ssh/id_rsa.pub
  username: root
  memory: 4096
  require_chef_omnibus: false
  user_variables:
    FILEHOME: http://10.1.1.2/~dev/repo/

provisioner:
  name: chef-solo
  environments_path: /home/local/chef-repo/cookbooks/init/environments/
  role_path: /home/local/chef-repo/cookbooks/init/roles/

platforms:
  - name: ubuntu-12.04

suites:
  - name: default
    provisioner:
      solo_rb:
        environment: dev
    run_list:
      - recipe[wfe]
      - role[common]
    attributes:

I ran kitchen test it gives the following message:

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ClientError
>>>>>> Message: Could not load the 'chef-solo' provisioner from the load path. Please ensure that your provisioner is installed as a gem or included in your Gemfile if using Bundler.
>>>>>> ----------------------

which chef-solo returns /opt/chefdk/bin/chef-solo

I have already installed kitchen-opennebula and its dependencies.

hlx98007 commented 8 years ago

I used kitchen diagnose it will also report this error. I don't think it is related to any cookbook.

danielsdeleo commented 8 years ago

I think it's supposed to be chef_solo with an underscore. I'll make an improvement request for test-kitchen to at least report which provisioners it knows about for cases like this.

noxxeexxon commented 8 years ago

This solution here may help you solve your problem: http://stackoverflow.com/questions/32112549/kitchen-list-command-fails-with-could-not-load-the-ssh-transport-from-the-l

"Solved it.

I ran

gem list Which gave the output

.. net-ssh (2.10.0.beta2, 2.9.2) .. I then issued the command:

gem uninstall net-ssh 2.10.9.beta2 And got the output:

Select gem to uninstall:

  1. net-ssh-2.10.0.beta2
  2. net-ssh-2.9.2
  3. All versions Whereupon I selected option 1, the gem was removed and then running

kitchen list Worked as expected"

hlx98007 commented 8 years ago

Hi, this problem is solved. It was a typo problem (indicated by @danielsdeleo ) Thanks!

danielsdeleo commented 8 years ago

BTW, I filed this issue as a follow up: https://github.com/test-kitchen/test-kitchen/issues/879