From 186d453621d2b524afac718545c6bdc7ee6a3eab Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Wed, 15 Oct 2014 01:02:47 -0300 Subject: [PATCH] Prefix action to fetch containers IP with ssh so that vagrant does not lock around its execution Closes GH-321 --- lib/vagrant-lxc/action.rb | 2 +- lib/vagrant-lxc/provider.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vagrant-lxc/action.rb b/lib/vagrant-lxc/action.rb index d021009..74370a9 100644 --- a/lib/vagrant-lxc/action.rb +++ b/lib/vagrant-lxc/action.rb @@ -195,7 +195,7 @@ module Vagrant # This action is called to read the IP of the container. The IP found # 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| b.use Builtin::Call, Builtin::ConfigValidate do |env, b2| b2.use FetchIpWithLxcAttach if env[:machine].provider.driver.supports_attach? diff --git a/lib/vagrant-lxc/provider.rb b/lib/vagrant-lxc/provider.rb index 286f4d9..fbae5b2 100644 --- a/lib/vagrant-lxc/provider.rb +++ b/lib/vagrant-lxc/provider.rb @@ -68,9 +68,9 @@ module Vagrant # we return nil. 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. - env = @machine.action("fetch_ip") + env = @machine.action("ssh_ip") # If we were not able to identify the container's IP, we return nil # here and we let Vagrant core deal with it ;)