Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Updates for Vagrant 1.3 #136

Merged
merged 6 commits into from
Sep 12, 2013
Merged

Updates for Vagrant 1.3 #136

merged 6 commits into from
Sep 12, 2013

Conversation

fgrehm
Copy link
Owner

@fgrehm fgrehm commented Sep 12, 2013

From the changelog:

config.ssh.max_tries is gone. Instead of maximum tries, Vagrant now uses a simple overall timeout value config.vm.boot_timeout to wait for the machine to boot up.

That means we need to fix https://github.com/fgrehm/vagrant-lxc/blob/master/lib/vagrant-lxc/action/boot.rb#L27

Besides that we need to support the new ProvisionerCleanup action from hashicorp/vagrant@d4c7e20

@stucki
Copy link
Contributor

stucki commented Sep 5, 2013

I just upgraded Vagrant to 1.3.0 and got hit by this problem. For now, here's a hotfix solution:

diff --git a/lib/vagrant-lxc/action/boot.rb b/lib/vagrant-lxc/action/boot.rb
index 9edb163..b64e43b 100644
--- a/lib/vagrant-lxc/action/boot.rb
+++ b/lib/vagrant-lxc/action/boot.rb
@@ -24,7 +24,7 @@ module Vagrant
         def wait_for_boot
           @env[:ui].info I18n.t("vagrant_lxc.messages.waiting_for_start")

-          @env[:machine].config.ssh.max_tries.to_i.times do |i|
+          1.times do |i|
             if @env[:machine].communicate.ready?
               @env[:ui].info I18n.t("vagrant_lxc.messages.container_ready")
               return true

I'm wondering after all why these SSH connection attempts should fail once but work on the next try. In my opinion, it will either work, or fail forever...

@fgrehm
Copy link
Owner Author

fgrehm commented Sep 5, 2013

@stucki tks for the hotfix :) as stated on a comment above that method, it was shamelessly stolen from the old version of VagrantPlugins::ProviderVirtualBox::Action::Boot and 1.3+ ships with a more robust built in action to deal with that stuff now.

I'll try to update vagrant-lxc to work on 1.3 later on tonight. I'm not sure how much effort it will take but I hope it won't be that hard, if it takes too much I might just drop support for vagrant < 1.3 on 0.6+ and keep the 0.5.x of the plugin series for 1.1 and 1.2 compatibility

@coveralls
Copy link

Coverage Status

Coverage increased (+0.54%) when pulling e4ee20c on 136-updates-for-vagrant-1.3 into 7f3f7b1 on master.

fgrehm added a commit that referenced this pull request Sep 12, 2013
@fgrehm fgrehm merged commit 660fb3f into master Sep 12, 2013
@fgrehm
Copy link
Owner Author

fgrehm commented Sep 12, 2013

Fixed on master! 🎆

@fgrehm fgrehm deleted the 136-updates-for-vagrant-1.3 branch September 12, 2013 04:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants