vvchik / vagrant-serverspec

Vagrant plugin that integrates serverspec
MIT License
191 stars 28 forks source link

Provision fails when used alongside chef provisioner #19

Closed btomasini closed 8 years ago

btomasini commented 9 years ago

Provision fails below with error. Output and config sanitized to remove client name. :)

Vagrant version 1.7.1 Windows 7 Host Vagrant-serverspec version 1.0.1

> vagrant provision
==> default: Loading Berkshelf datafile...
==> default: Sharing cookbooks with VM
==> default: Updating Vagrant's Berkshelf...
==> default: Resolving cookbook dependencies...
==> default: Fetching 'foo-dev' from source at .
==> default: Using apt (2.6.1)
==> default: Using ark (0.9.1) from https://github.com/btomasini/ark (at master)
==> default: Using build-essential (2.1.3)
==> default: Using foo-dev (0.0.1) from source at .
==> default: Vendoring apt (2.6.1) to C:/Users/v.btomasini/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150310-12136-1v1adtw-default/apt
==> default: Vendoring ark (0.9.1) to C:/Users/v.btomasini/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150310-12136-1v1adtw-default/ark
==> default: Vendoring build-essential (2.1.3) to C:/Users/v.btomasini/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150310-12136-1v1adtw-default/build-essential
==> default: Vendoring foo-dev (0.0.1) to C:/Users/v.btomasini/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150310-12136-1v1adtw-default/foo-dev
==> default: Running provisioner: chef_solo...
==> default: Detected Chef (latest) is already installed
Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: stdin: is not a tty
==> default: [2015-03-10T13:01:14-07:00] INFO: Forking chef instance to converge...
==> default: [2015-03-10T13:01:14-07:00] INFO: *** Chef 12.1.1 ***
==> default: [2015-03-10T13:01:14-07:00] INFO: Chef-client pid: 2746
==> default: [2015-03-10T13:01:16-07:00] INFO: Setting the run_list to ["recipe[apt]", "recipe[foo-dev]"] from CLI options
==> default: [2015-03-10T13:01:16-07:00] INFO: Run List is [recipe[apt], recipe[foo-dev]]
==> default: [2015-03-10T13:01:16-07:00] INFO: Run List expands to [apt, foo-dev]
==> default: [2015-03-10T13:01:16-07:00] INFO: Starting Chef Run for dev
==> default: [2015-03-10T13:01:16-07:00] INFO: Running start handlers
==> default: [2015-03-10T13:01:16-07:00] INFO: Start handlers complete.
==> default: [2015-03-10T13:01:16-07:00] INFO: Chef Run complete in 0.327699092 seconds
==> default: [2015-03-10T13:01:16-07:00] INFO: Skipping removal of unused files from the cache
==> default: [2015-03-10T13:01:16-07:00] INFO: Running report handlers
==> default: [2015-03-10T13:01:16-07:00] INFO: Report handlers complete
==> default: Running provisioner: serverspec...
An action 'up' was attempted on the machine 'default',
but another process is already executing an action on the machine.
Vagrant locks each machine for access by only one process at a time.
Please wait until the other Vagrant process finishes modifying this
machine, then try again.

If you believe this message is in error, please check the process
listing for any "ruby" or "vagrant" processes and kill them. Then
try again.
The process cannot access the file because it is being used by another process.
Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
v.btomasini@192.168.222.129's password:
RSpec is shutting down and will print the summary report... Interrupt again to force quit.

Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :
#

Vagrant.configure('2') do |config|

  config.berkshelf.enabled = true

  config.vm.box = 'codasys/xubuntu-desktop-14.04.1'
  config.vm.hostname = 'dev'

  config.vm.provider 'vmware_workstation' do |p|
    p.gui = true
    p.vmx["memsize"]  = 4096
    p.vmx["numvcpus"] = 2
    p.vmx["vhv.enable"] = 'TRUE'
  end

  config.vm.provision :chef_solo do |chef|
    chef.add_recipe 'apt'
    chef.add_recipe 'foo-dev'
  end

  config.vm.provision :serverspec do |spec|
    spec.pattern = 'spec/dev/*_spec.rb'
  end

end

Vagrant plugins:

vagrant-berkshelf (4.0.3)
vagrant-omnibus (1.4.1)
vagrant-serverspec (1.0.1)
vagrant-share (1.1.4, system)
vagrant-vmware-workstation (3.2.4)
vvchik commented 8 years ago

@btomasini, do you have some updates? Because it works OK for me

vvchik commented 8 years ago

Unable to reproduce. Closed, by lack of data from reporter.