Commit graph

62 commits

Author SHA1 Message Date
Ray Ruvinskiy
dc55c914e4 Work around WaitForCommunicator lock race condition
The LXC provider issues the "fetch_ip" action to look up the IP address
of the container as part of its "ssh_info" action.
Vagrant::LXC::Action.action_fetch_ip checks the machine state using
Builtin::IsState, which calls Vagrant::Machine.state, which also updates
the state in the machine index and acquires a machine index entry lock to do that.
A race condition ensues in WaitForCommunicator.call, where ready_thr tries
to acquire the machine index lock while running ssh_info, and states_thr tries
to acquire the same lock doing its own state look up (env[:machine].state.id).
If they both try to acquire the lock at the same time, one will fail, and
an exception will be raised.

Work around this issue by checking for the desired machine state (:running) in
Vagrant::LXC::Provider.ssh_info, which can get the state from
Vagrant::LXC::Provider.state, which in turn does not write out the state into
the index file and does not acquire the index entry lock.
2014-09-29 16:47:29 -04:00
Franz Pletz
ec4a52559a Add check for box updates to start action
This action apparently needs to be added to every provider. See
lib/vagrant/plugins/providers/virtualbox/action.rb from the Vagrant
source for reference how the virtualbox provider is doing it.
2014-09-05 20:52:03 +02:00
Kristof Willaert
a4768c26ca Add fallback mechanism for platforms without attach support
Some platforms (most notably CentOS and RHEL) use a kernel without
'attach' support. This patch detects this absence and falls back
to the alternative ways of doing things like detection of IP address
and halting the container.
It does so by running the command "true" through lxc-attach.
2014-06-03 17:53:26 +02:00
Fabio Rehm
5df28390e2 Merge branch 'utsname-hostname' of github.com:fpletz/vagrant-lxc 2014-03-13 23:05:47 -03:00
Fabio Rehm
dfd93d087c action: Keep old behavior of erroring on vagrant ssh -c instead of just showing a message 2014-03-13 23:02:18 -03:00
Fabio Rehm
7e79d59365 core: Fix vagrant ssh [GH-252] 2014-03-13 09:42:39 -03:00
Fabio Rehm
61002b9bb8 core: Remove actions that check for containers statuses 2014-03-13 00:57:37 -03:00
Fabio Rehm
803e446dc5 backports: Add IsState 2014-03-13 00:57:37 -03:00
Fabio Rehm
71b02ab511 We dont need to provide support for all versions on the 1.1.x series ;) 2014-03-13 00:57:37 -03:00
Fabio Rehm
23e82594e1 backports: Add Action::Message 2014-03-13 00:57:36 -03:00
Fabio Rehm
f2c1f70cc7 backports: Alias 1.5 new Vagrant::UI::Interface methods 2014-03-13 00:57:36 -03:00
Fabio Rehm
bb8514b518 core: "Tag" ShareFolders action as backport functionality 2014-03-13 00:57:36 -03:00
Fabio Rehm
d5abb523de core: Implement support for built in synced folders and add required logic for NFS 2014-03-13 00:57:36 -03:00
Fabio Rehm
a0acc571b2 core: Use HandleBox in case Vagrant 1.5 is in use 2014-03-13 00:57:36 -03:00
Fabio Rehm
f5661280bc core: Kick off a vagrant-backports lib with method for verifying vagrant version 2014-03-13 00:57:36 -03:00
Fabio Rehm
6b5db24a6b Better than a note on the readme is a warning for users about unsupported private / public networks :)
Closes GH-154
2013-11-06 20:40:08 -02:00
Fabio Rehm
bcfb7b3e00 Moar annotations 2013-09-28 01:46:26 -03:00
Fabio Rehm
2e5e5920d7 Shortcuts! 2013-09-28 01:05:10 -03:00
Fabio Rehm
2116737989 Dont worry about machine state when waiting for communicator [GH-142] [GH-146] 2013-09-27 12:27:25 -03:00
Fabio Rehm
6680858184 Improve logging and add some TODOs that have been around for a while 2013-09-21 01:32:15 -03:00
Fabio Rehm
791a93fe9e Make use of the new WaitForCommunicator action on boot 2013-09-12 01:10:11 -03:00
Fabio Rehm
f13806626c Use vagrant 1.3+ ProvisionerCleanup builtin action on destroy 2013-09-11 22:10:18 -03:00
Fabio Rehm
0385a64d31 Replace ugly driver builder with a more intelligent approach
References #118
2013-07-29 12:08:24 -03:00
Fabio Rehm
97f6edeed8 Error out if LXC is not installed
This is enough to close #11
2013-07-28 02:55:00 -03:00
Fabio Rehm
dee099ce96 Make use of vagrant's builtin action for handling forwarded port collisions
Closes #5
2013-07-28 02:39:11 -03:00
Fabio Rehm
b190f45f45 Remove /tmp files after machine shutdown
Fixes #68
2013-05-08 20:13:19 -03:00
Fabio Rehm
10914d53b0 Add our own DestroyConfirm action 2013-04-18 03:11:36 -03:00
Fabio Rehm
ecc127321f Get rid of dependency on VBox provider for displaying some messages to the user 2013-04-18 03:01:01 -03:00
Fabio Rehm
3a458df621 Add a general purpose ui "messager" / "logger" Action 2013-04-18 03:01:01 -03:00
Fabio Rehm
e4dd0620ce Revert "Remove custom Disconnect action"
This reverts commit a8825b0b28.

I'm still having issues with SSH connections, even with 1.1.5
2013-04-10 01:37:07 -03:00
Fabio Rehm
116bde9655 Remove commented out actions that we wont implement 2013-04-10 00:09:45 -03:00
Fabio Rehm
a8825b0b28 Remove custom Disconnect action 2013-04-08 21:12:49 -03:00
Fabio Rehm
1eb7b52da9 💣 custom machine state class 2013-04-08 20:12:05 -03:00
Fabio Rehm
670a43da00 Remove custom network action since we are not going to support it for a while 2013-04-05 22:10:49 -03:00
Fabio Rehm
c433465432 Remove old comment 2013-04-05 22:10:48 -03:00
Fabio Rehm
164e57695e 💣 BaseAction 2013-04-05 22:10:48 -03:00
Fabio Rehm
23bb2e0733 Implement provider's package action 2013-03-30 19:19:38 -03:00
Fabio Rehm
b54dcdc57b Remove commented out actions that we wont implement 2013-03-30 16:54:46 -03:00
Fabio Rehm
004ad783e3 Kill redir processes on machine halt 2013-03-26 22:14:31 -03:00
Fabio Rehm
0f3b99b376 Add port forwarding middleware to containers boot action 2013-03-26 22:14:31 -03:00
Fabio Rehm
b4eb38e551 Update LXC::Action TODOs 2013-03-26 22:00:30 -03:00
Fabio Rehm
b5465ddab2 Add middleware to force ssh disconnect 2013-03-19 03:20:32 -03:00
Fabio Rehm
59267d01e6 Get rid of a few TODOs that does not make sense anymore 2013-03-11 00:10:00 -03:00
Fabio Rehm
f2810da629 Add support for setting host name 2013-03-11 00:09:36 -03:00
Fabio Rehm
270cbd8a51 Move forced halt code into its own action 2013-03-11 00:08:28 -03:00
Fabio Rehm
1b9dcf5aad Comment out and remove blank actions 2013-03-10 02:33:22 -03:00
Fabio Rehm
3d30418e53 Remove after create script support from box metadata 2013-03-07 02:44:06 -03:00
Fabio Rehm
5ec73c867b private network with IP: check
Closes #28
2013-03-05 01:10:28 -03:00
Fabio Rehm
d31769984f Handle box url from Vagrantfile
Closes #17
2013-03-04 19:40:40 -03:00
Fabio Rehm
35f2c6eaf5 Check-in some TODOs and REFACTORs that have been around for a while 2013-03-04 01:16:45 -03:00