From cf73a843d0bdb3d03ef88d2206733038af002880 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Thu, 12 Sep 2013 01:12:07 -0300 Subject: [PATCH] Do not worry about transition to running state when starting a container, this is handled from outside --- lib/vagrant-lxc/driver.rb | 4 ++-- spec/unit/driver_spec.rb | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/vagrant-lxc/driver.rb b/lib/vagrant-lxc/driver.rb index ed7b530..aa1133b 100644 --- a/lib/vagrant-lxc/driver.rb +++ b/lib/vagrant-lxc/driver.rb @@ -78,7 +78,7 @@ module Vagrant prune_customizations write_customizations(customizations + @customizations) - @cli.transition_to(:running) { |c| c.start(extra) } + @cli.start(extra) end def forced_halt @@ -109,7 +109,7 @@ module Vagrant @logger.info "Compressing '#{rootfs_path}' rootfs to #{target_path}" @sudo_wrapper.run('rm', '-f', 'rootfs.tar.gz') @sudo_wrapper.run('tar', '--numeric-owner', '-czf', target_path, 'rootfs') - + @logger.info "Changing rootfs tarball owner" user_details=Etc.getpwnam(Etc.getlogin) diff --git a/spec/unit/driver_spec.rb b/spec/unit/driver_spec.rb index ab52f05..f54e1d6 100644 --- a/spec/unit/driver_spec.rb +++ b/spec/unit/driver_spec.rb @@ -80,7 +80,6 @@ describe Vagrant::LXC::Driver do subject { described_class.new('name', sudo, cli) } before do - cli.stub(:transition_to).and_yield(cli) subject.customizations << internal_customization subject.start(customizations) end @@ -92,10 +91,6 @@ describe Vagrant::LXC::Driver do it 'starts container with configured customizations' do cli.should have_received(:start) end - - it 'expects a transition to running state to take place' do - cli.should have_received(:transition_to).with(:running) - end end describe 'halt' do