From 49963b532d58e80bfa7af5c6f369c9f0f5502ecb Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Tue, 5 Mar 2013 01:02:05 -0300 Subject: [PATCH] Increase after-create-script sleep time between retries + add support for writing out lxc-start debugging logs --- lib/vagrant-lxc/container.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/vagrant-lxc/container.rb b/lib/vagrant-lxc/container.rb index aee0325..18f2ceb 100644 --- a/lib/vagrant-lxc/container.rb +++ b/lib/vagrant-lxc/container.rb @@ -55,7 +55,7 @@ module Vagrant private_key = Vagrant.source_root.join('keys', 'vagrant').expand_path.to_s # TODO: Gotta write somewhere that it has to be indempotent - retryable(:tries => 5, :sleep => 1.5) do + retryable(:tries => 5, :sleep => 2) do @logger.debug 'Attempt to run after-create-script from box metadata' execute *[ script, @@ -89,6 +89,7 @@ module Vagrant def start(config) # @logger.info('Starting container...') opts = config.start_opts.map { |opt| ["-s", opt] }.flatten + opts += ['-o', ENV['LXC_START_LOG_FILE'], '-l', 'DEBUG'] if ENV['LXC_START_LOG_FILE'] lxc :start, '-d', '--name', @name, *opts wait_until :running end