core: config.ssh.timeout => config.vm.boot_timeout
This commit is contained in:
parent
c38fadfd2f
commit
5a4c06f75e
|
@ -3,7 +3,7 @@
|
|||
BACKWARDS INCOMPATIBILITY:
|
||||
|
||||
- `config.ssh.max_tries` is gone. Instead of maximum tries, Vagrant now
|
||||
uses a simple overall timeout value `config.ssh.timeout` to wait for
|
||||
uses a simple overall timeout value `config.vm.boot_timeout` to wait for
|
||||
the machine to boot up.
|
||||
- `config.vm.graceful_halt_retry_*` settings are gone. Instead, a single
|
||||
timeout is now used to wait for a graceful halt to work, specified
|
||||
|
|
|
@ -5,7 +5,6 @@ Vagrant.configure("2") do |config|
|
|||
config.ssh.forward_x11 = false
|
||||
config.ssh.guest_port = 22
|
||||
config.ssh.keep_alive = true
|
||||
config.ssh.timeout = 300
|
||||
config.ssh.shell = "bash -l"
|
||||
|
||||
config.ssh.default.username = "vagrant"
|
||||
|
@ -13,6 +12,7 @@ Vagrant.configure("2") do |config|
|
|||
config.vm.usable_port_range = (2200..2250)
|
||||
config.vm.box_url = nil
|
||||
config.vm.base_mac = nil
|
||||
config.vm.boot_timeout = 300
|
||||
config.vm.graceful_halt_timeout = 60
|
||||
|
||||
# Share SSH locally by default
|
||||
|
|
|
@ -14,7 +14,7 @@ module Vagrant
|
|||
# for interrupts.
|
||||
ready_thr = Thread.new do
|
||||
Thread.current[:result] = env[:machine].communicate.wait_for_ready(
|
||||
env[:machine].config.ssh.timeout)
|
||||
env[:machine].config.vm.boot_timeout)
|
||||
end
|
||||
|
||||
# Start a thread that verifies the VM stays in a good state.
|
||||
|
|
|
@ -10,7 +10,6 @@ module VagrantPlugins
|
|||
attr_accessor :guest_port
|
||||
attr_accessor :keep_alive
|
||||
attr_accessor :shell
|
||||
attr_accessor :timeout
|
||||
|
||||
attr_reader :default
|
||||
|
||||
|
@ -22,7 +21,6 @@ module VagrantPlugins
|
|||
@guest_port = UNSET_VALUE
|
||||
@keep_alive = UNSET_VALUE
|
||||
@shell = UNSET_VALUE
|
||||
@timeout = UNSET_VALUE
|
||||
|
||||
@default = SSHConnectConfig.new
|
||||
end
|
||||
|
@ -42,7 +40,6 @@ module VagrantPlugins
|
|||
@guest_port = nil if @guest_port == UNSET_VALUE
|
||||
@keep_alive = false if @keep_alive == UNSET_VALUE
|
||||
@shell = nil if @shell == UNSET_VALUE
|
||||
@timeout = nil if @timeout == UNSET_VALUE
|
||||
|
||||
@default.finalize!
|
||||
end
|
||||
|
@ -54,11 +51,6 @@ module VagrantPlugins
|
|||
def validate(machine)
|
||||
errors = super
|
||||
|
||||
[:timeout].each do |field|
|
||||
value = instance_variable_get("@#{field}".to_sym)
|
||||
errors << I18n.t("vagrant.config.common.error_empty", :field => field) if !value
|
||||
end
|
||||
|
||||
# Return the errors
|
||||
result = { to_s => errors }
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ module VagrantPlugins
|
|||
DEFAULT_VM_NAME = :default
|
||||
|
||||
attr_accessor :base_mac
|
||||
attr_accessor :boot_timeout
|
||||
attr_accessor :box
|
||||
attr_accessor :box_url
|
||||
attr_accessor :box_download_insecure
|
||||
|
@ -25,6 +26,7 @@ module VagrantPlugins
|
|||
attr_reader :provisioners
|
||||
|
||||
def initialize
|
||||
@boot_timeout = UNSET_VALUE
|
||||
@box_download_insecure = UNSET_VALUE
|
||||
@graceful_halt_timeout = UNSET_VALUE
|
||||
@guest = UNSET_VALUE
|
||||
|
@ -244,6 +246,7 @@ module VagrantPlugins
|
|||
|
||||
def finalize!
|
||||
# Defaults
|
||||
@boot_timeout = 300 if @boot_timeout == UNSET_VALUE
|
||||
@box_download_insecure = false if @box_download_insecure == UNSET_VALUE
|
||||
@graceful_halt_timeout = 300 if @graceful_halt_timeout == UNSET_VALUE
|
||||
@guest = nil if @guest == UNSET_VALUE
|
||||
|
|
Loading…
Reference in New Issue