Increase after-create-script sleep time between retries + add support for writing out lxc-start debugging logs
This commit is contained in:
parent
5ec73c867b
commit
49963b532d
1 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,7 @@ module Vagrant
|
||||||
private_key = Vagrant.source_root.join('keys', 'vagrant').expand_path.to_s
|
private_key = Vagrant.source_root.join('keys', 'vagrant').expand_path.to_s
|
||||||
|
|
||||||
# TODO: Gotta write somewhere that it has to be indempotent
|
# 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'
|
@logger.debug 'Attempt to run after-create-script from box metadata'
|
||||||
execute *[
|
execute *[
|
||||||
script,
|
script,
|
||||||
|
@ -89,6 +89,7 @@ module Vagrant
|
||||||
def start(config)
|
def start(config)
|
||||||
# @logger.info('Starting container...')
|
# @logger.info('Starting container...')
|
||||||
opts = config.start_opts.map { |opt| ["-s", opt] }.flatten
|
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
|
lxc :start, '-d', '--name', @name, *opts
|
||||||
wait_until :running
|
wait_until :running
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue