Commit graph

15 commits

Author SHA1 Message Date
Virgil Dupras
aa777653f4 Use lxc-info instead of lxc-attach to retrieve container IP
`lxc-info -iH` to retrieve IP address was not available in early LXC
development but was there at LXC 1.0. Because we've bumped our minimum
LXC requirement to v1.0 recently, we can simplify the IP retrieval
process and also get rid of the `dnsmasq` fallback.
2018-01-13 15:53:28 -05:00
Nick Griffiths
f224fc5ea5 Fix for #336:
Subprocessed being interrupted resulted in it looking
like those commands were executing successfully but with
zero output.  Interrupting the sudo prompt would result
in any command running in sudo returning nothing and looking
like it had succeeded.  There was some clean up code in
the lxc provider that nuked vagrant container state in
the .vagrant directory if it looked like the container no
longer existed based on the result of lxc-ls.  Interrupting
this check resulted in it looking like the container not
existing, resulting in the provider code nuking the lxc dir
in .vagrant.  Voila
2017-12-16 12:07:11 +13:00
Robert Heinzmann
544c061e65 Fix handling of non-fatal lxc-stop return code
Fixes #405
2016-05-11 16:50:29 -07:00
Fabio Rehm
8b37056294 provider: Show an user friendly message when trying to use the plugin on non-Linux environments 2015-01-08 02:17:32 -02:00
Azamat Khudaygulov
f454924a59 The path of storage containers taken from lxc-config, instead of using a constant for lxc>=1.0.0.
* for lxc to 1.0.0 using constant Vagrant::LXC::Driver::DEFAULT_CONTAINERS_PATH
 * change method Vagrant::LXC::Driver::CLI#version to call lxc-create if lxc-version command not exists (to lxc version 1.0.0)
2014-09-23 16:07:03 +04:00
Fabio Rehm
7e00b96520 Show something meaningful to the user in case the container already exists [GH-132] 2014-02-02 19:27:08 -02:00
Fabio Rehm
f9dd5392ff Improve checking for support for fetching IP with lxc-attach [GH-118] 2013-09-28 22:37:31 -03:00
Fabio Rehm
18bb9482d5 Nicely handles missing templates path (fixes GH-139) 2013-09-28 02:58:38 -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
Darrell Hamilton
ad41c445a4 Check for redir before forwarding ports
Make a system call out to `which` to see if redir exists on the PATH
before trying to forward ports.  Raises a VagrantError if it does not.
2013-07-14 22:42:49 -07:00
Fabio Rehm
dcc0ce281f Lets be clear about box version error 2013-06-08 01:13:51 -03:00
Fabio Rehm
fd0c863f34 Properly handle invalid boxes 2013-04-08 22:06:38 -03:00
Fabio Rehm
082f7dc5d3 Rename Container to Driver 2013-04-05 22:10:48 -03:00
Fabio Rehm
759b1c5f80 Extract rootfs tar contents into a tmp folder to avoid headaches and
check if a lxc-template file was included on .box
2013-03-08 00:55:58 -03:00
Fabio Rehm
8b8bfe739b lxc-create: check 2013-03-01 21:52:13 -03:00