Prefix action to fetch containers IP with ssh so that vagrant does not lock around its execution

Closes GH-321
This commit is contained in:
Fabio Rehm 2014-10-15 01:02:47 -03:00
parent 80ca559258
commit 186d453621
2 changed files with 3 additions and 3 deletions

View file

@ -195,7 +195,7 @@ module Vagrant
# This action is called to read the IP of the container. The IP found # This action is called to read the IP of the container. The IP found
# is expected to be put into the `:machine_ip` key. # is expected to be put into the `:machine_ip` key.
def self.action_fetch_ip def self.action_ssh_ip
Builder.new.tap do |b| Builder.new.tap do |b|
b.use Builtin::Call, Builtin::ConfigValidate do |env, b2| b.use Builtin::Call, Builtin::ConfigValidate do |env, b2|
b2.use FetchIpWithLxcAttach if env[:machine].provider.driver.supports_attach? b2.use FetchIpWithLxcAttach if env[:machine].provider.driver.supports_attach?

View file

@ -68,9 +68,9 @@ module Vagrant
# we return nil. # we return nil.
return nil if state.id != :running return nil if state.id != :running
# Run a custom action called "fetch_ip" which does what it says and puts # Run a custom action called "ssh_ip" which does what it says and puts
# the IP found into the `:machine_ip` key in the environment. # the IP found into the `:machine_ip` key in the environment.
env = @machine.action("fetch_ip") env = @machine.action("ssh_ip")
# If we were not able to identify the container's IP, we return nil # If we were not able to identify the container's IP, we return nil
# here and we let Vagrant core deal with it ;) # here and we let Vagrant core deal with it ;)