1

When I run kitchen test on my MacBook, it gets through most of the steps, but then gets stuck here twiddling its thumbs:

       Running handlers:
       Running handlers complete
       Chef Client finished, 81/117 resources updated in 07 minutes 12 seconds
       Finished converging <default-ubuntu-1404> (7m42.70s).
-----> Setting up <default-ubuntu-1404>...
       Finished setting up <default-ubuntu-1404> (0m0.00s).
-----> Verifying <default-ubuntu-1404>...
       Preparing files for transfer
-----> Installing Busser (busser)
Fetching: thor-0.19.0.gem (100%)
       Successfully installed thor-0.19.0
Fetching: busser-0.7.1.gem (100%)
       Successfully installed busser-0.7.1
       2 gems installed
       Installing Busser plugins: busser-serverspec

Several hours later, still says the same thing. No progress. Oddly, it never errors or times out, either - just keeps waiting for something. And it doesn't happen on my work MacBook, only my home one (late 2011 - old, but still effective).

Mac OS 10.11.4 (El Capitan), ChefDK 0.13.21, Virtualbox 5.0.20, Kitchen.yml:

---
driver:
  name: vagrant

provisioner:
  name: chef_solo

platforms:
  - name: ubuntu-14.04

suites:
  - name: default
    data_bags_path: "test/integration/data_bags" 
    run_list:
      - recipe[devserver::default]
    attributes:

Any ideas? Ways I can dig deeper and debug? Solutions? Thanks!

Andrew Evans
  • 897
  • 2
  • 7
  • 17

1 Answers1

4

Okay, I copied bits of the recipe one-by-one to a new cookbook and figured it out. The problem was a conflict between the users cookbook, the sudo cookbook, and Vagrant.

tl;dr the sudo cookbook strips the "vagrant" user of its power. I imagine busser was stuck waiting to enter a password or something. To fix, I added the following to my .kitchen.yml :

suites:
  - name: default
    run_list:
      - recipe[mycookbook::default]
    data_bags_path: "test/integration/data_bags" 
    attributes:
      authorization:
        sudo:
          passwordless: true
          users: ['vagrant']

This lets the vagrant user run sudo commands without a password, and busser can once again install its plugins.

If my google-fu had been a little better, I might have found someone else who had a similar problem. Hopefully another copy of the issue + answer on the internet will make it easier for someone else to figure out.

Andrew Evans
  • 897
  • 2
  • 7
  • 17