vagrant-lxc 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +62 -40
- data/README.md +42 -28
- data/lib/vagrant-lxc/action.rb +9 -23
- data/lib/vagrant-lxc/action/create.rb +14 -5
- data/lib/vagrant-lxc/action/gc_private_network_bridges.rb +46 -0
- data/lib/vagrant-lxc/action/private_networks.rb +43 -0
- data/lib/vagrant-lxc/action/warn_networks.rb +3 -3
- data/lib/vagrant-lxc/command/sudoers.rb +4 -3
- data/lib/vagrant-lxc/driver.rb +63 -1
- data/lib/vagrant-lxc/driver/cli.rb +1 -1
- data/lib/vagrant-lxc/errors.rb +4 -0
- data/lib/vagrant-lxc/plugin.rb +7 -14
- data/lib/vagrant-lxc/provider.rb +9 -1
- data/lib/vagrant-lxc/version.rb +1 -1
- data/locales/en.yml +10 -3
- data/scripts/pipework +298 -0
- data/spec/unit/driver/cli_spec.rb +3 -1
- data/spec/unit/driver_spec.rb +85 -23
- data/templates/sudoers.rb.erb +27 -6
- metadata +5 -11
- data/lib/vagrant-backports/README.md +0 -12
- data/lib/vagrant-backports/action/handle_box.rb +0 -1
- data/lib/vagrant-backports/action/is_state.rb +0 -34
- data/lib/vagrant-backports/action/message.rb +0 -20
- data/lib/vagrant-backports/action/wait_for_communicator.rb +0 -42
- data/lib/vagrant-backports/ui.rb +0 -12
- data/lib/vagrant-backports/utils.rb +0 -27
- data/lib/vagrant-lxc/action/message.rb +0 -0
- data/lib/vagrant-lxc/backports/action/share_folders.rb +0 -67
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac8726c09c9ffb849e24a02ddc77e19933177f61
|
4
|
+
data.tar.gz: 6d46c754650c72a3437723209b37934186c10682
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a4c71775855fc653c039cee3c13749751f3954388c8d78309093241867c7dce5a1dc33c61fbdfb61c51e611674c87273e0f2acce0cdc291049edaf0a8feb039
|
7
|
+
data.tar.gz: 9a33dfee5ec2abe7d0fe6a8f02a24ea0c92526fcf7820c1717b789789ed57754f711d9158b7527f717cc16a7f3d95635049ba46fd0c546e66b6b724c4e8b01a9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,36 @@
|
|
1
|
+
## [1.1.0](https://github.com/fgrehm/vagrant-lxc/compare/v1.0.1...1.1.0) (Jan 14, 2015)
|
2
|
+
|
3
|
+
BACKWARDS INCOMPATIBILITIES:
|
4
|
+
|
5
|
+
- Support for Vagrant versions prior to 1.5 have been removed. The plugin now targets
|
6
|
+
Vagrant 1.7+ but it _might_ work on 1.5+.
|
7
|
+
|
8
|
+
FEATURES:
|
9
|
+
|
10
|
+
- New experimental support for private networking [[GH-298]] / [[GH-120]].
|
11
|
+
- Support for formatted overlayfs path [[GH-329]]
|
12
|
+
|
13
|
+
|
14
|
+
[GH-298]: https://github.com/fgrehm/vagrant-lxc/pull/298
|
15
|
+
[GH-120]: https://github.com/fgrehm/vagrant-lxc/issues/120
|
16
|
+
[GH-329]: https://github.com/fgrehm/vagrant-lxc/pull/329
|
17
|
+
|
18
|
+
IMPROVEMENTS:
|
19
|
+
|
20
|
+
- The provider will now have a higher priority over the VirtualBox provider
|
21
|
+
in case VirtualBox is installed alongside lxc dependecies.
|
22
|
+
- Show an user friendly message when trying to use the plugin on non-Linux
|
23
|
+
environments.
|
24
|
+
|
25
|
+
BUG FIXES:
|
26
|
+
|
27
|
+
- Allow backingstore options to be used along with the sudo wrapper script [[GH-310]]
|
28
|
+
- Trim automatically generated container names to 64 chars [[GH-337]]
|
29
|
+
|
30
|
+
[GH-337]: https://github.com/fgrehm/vagrant-lxc/issues/337
|
31
|
+
[GH-310]: https://github.com/fgrehm/vagrant-lxc/issues/310
|
32
|
+
|
33
|
+
|
1
34
|
## [1.0.1](https://github.com/fgrehm/vagrant-lxc/compare/v1.0.0...v1.0.1) (Oct 15, 2014)
|
2
35
|
|
3
36
|
IMPROVEMENTS:
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
GIT
|
2
2
|
remote: https://github.com/fgrehm/vagrant-cachier.git
|
3
|
-
revision:
|
3
|
+
revision: 9f6b615e84364b851939a8e7ee8229fc0d276c73
|
4
4
|
specs:
|
5
|
-
vagrant-cachier (
|
5
|
+
vagrant-cachier (1.1.0)
|
6
6
|
|
7
7
|
GIT
|
8
8
|
remote: https://github.com/fgrehm/vagrant-pristine.git
|
@@ -12,7 +12,7 @@ GIT
|
|
12
12
|
|
13
13
|
GIT
|
14
14
|
remote: https://github.com/mitchellh/vagrant-spec.git
|
15
|
-
revision:
|
15
|
+
revision: 1df5a3af81cb7cce568b2eac52b8f6822bcb1d8e
|
16
16
|
specs:
|
17
17
|
vagrant-spec (0.0.1)
|
18
18
|
childprocess (~> 0.5.0)
|
@@ -22,25 +22,30 @@ GIT
|
|
22
22
|
|
23
23
|
GIT
|
24
24
|
remote: https://github.com/mitchellh/vagrant.git
|
25
|
-
revision:
|
25
|
+
revision: 1cd667b243f4a263cd5322b6455165cc676b6f7f
|
26
|
+
tag: v1.7.2
|
26
27
|
specs:
|
27
|
-
vagrant (1.
|
28
|
-
bundler (>= 1.5.2, < 1.
|
28
|
+
vagrant (1.7.2)
|
29
|
+
bundler (>= 1.5.2, < 1.8.0)
|
29
30
|
childprocess (~> 0.5.0)
|
30
31
|
erubis (~> 2.7.0)
|
32
|
+
hashicorp-checkpoint (~> 0.1.1)
|
31
33
|
i18n (~> 0.6.0)
|
32
|
-
listen (~> 2.
|
34
|
+
listen (~> 2.8.0)
|
33
35
|
log4r (~> 1.1.9, < 1.1.11)
|
34
36
|
net-scp (~> 1.1.0)
|
37
|
+
net-sftp (~> 2.1)
|
35
38
|
net-ssh (>= 2.6.6, < 2.10.0)
|
39
|
+
nokogiri (= 1.6.3.1)
|
36
40
|
rb-kqueue (~> 0.2.0)
|
41
|
+
rest-client (>= 1.6.0, < 2.0)
|
37
42
|
wdm (~> 0.1.0)
|
38
43
|
winrm (~> 1.1.3)
|
39
44
|
|
40
45
|
PATH
|
41
46
|
remote: .
|
42
47
|
specs:
|
43
|
-
vagrant-lxc (1.0
|
48
|
+
vagrant-lxc (1.1.0)
|
44
49
|
|
45
50
|
GEM
|
46
51
|
remote: https://rubygems.org/
|
@@ -49,40 +54,47 @@ GEM
|
|
49
54
|
gyoku (>= 0.4.0)
|
50
55
|
nokogiri
|
51
56
|
builder (3.2.2)
|
52
|
-
celluloid (0.
|
53
|
-
timers (~>
|
54
|
-
childprocess (0.5.
|
57
|
+
celluloid (0.16.0)
|
58
|
+
timers (~> 4.0.0)
|
59
|
+
childprocess (0.5.5)
|
55
60
|
ffi (~> 1.0, >= 1.0.11)
|
56
61
|
coderay (1.1.0)
|
57
|
-
coveralls (0.7.
|
62
|
+
coveralls (0.7.1)
|
58
63
|
multi_json (~> 1.3)
|
59
64
|
rest-client
|
60
65
|
simplecov (>= 0.7)
|
61
66
|
term-ansicolor
|
62
67
|
thor
|
63
68
|
diff-lcs (1.2.5)
|
64
|
-
docile (1.1.
|
69
|
+
docile (1.1.5)
|
65
70
|
erubis (2.7.0)
|
66
|
-
ffi (1.9.
|
71
|
+
ffi (1.9.6)
|
67
72
|
formatador (0.2.5)
|
68
73
|
gssapi (1.0.3)
|
69
74
|
ffi (>= 1.0.1)
|
70
|
-
guard (2.
|
75
|
+
guard (2.11.1)
|
71
76
|
formatador (>= 0.2.4)
|
72
77
|
listen (~> 2.7)
|
73
78
|
lumberjack (~> 1.0)
|
79
|
+
nenv (~> 0.1)
|
80
|
+
notiffany (~> 0.0)
|
74
81
|
pry (>= 0.9.12)
|
82
|
+
shellany (~> 0.0)
|
75
83
|
thor (>= 0.18.1)
|
76
|
-
guard-
|
84
|
+
guard-compat (1.2.0)
|
85
|
+
guard-rspec (4.5.0)
|
77
86
|
guard (~> 2.1)
|
78
|
-
|
79
|
-
|
87
|
+
guard-compat (~> 1.1)
|
88
|
+
rspec (>= 2.99.0, < 4.0)
|
89
|
+
gyoku (1.2.2)
|
80
90
|
builder (>= 2.1.2)
|
81
|
-
|
91
|
+
hashicorp-checkpoint (0.1.4)
|
92
|
+
hitimes (1.2.2)
|
93
|
+
httpclient (2.6.0.1)
|
82
94
|
httpi (0.9.7)
|
83
95
|
rack
|
84
|
-
i18n (0.6.
|
85
|
-
listen (2.
|
96
|
+
i18n (0.6.11)
|
97
|
+
listen (2.8.5)
|
86
98
|
celluloid (>= 0.15.2)
|
87
99
|
rb-fsevent (>= 0.9.3)
|
88
100
|
rb-inotify (>= 0.9)
|
@@ -91,38 +103,46 @@ GEM
|
|
91
103
|
logging (1.8.2)
|
92
104
|
little-plugger (>= 1.1.3)
|
93
105
|
multi_json (>= 1.8.4)
|
94
|
-
lumberjack (1.0.
|
106
|
+
lumberjack (1.0.9)
|
95
107
|
method_source (0.8.2)
|
96
|
-
mime-types (2.3)
|
108
|
+
mime-types (2.4.3)
|
97
109
|
mini_portile (0.6.0)
|
98
110
|
multi_json (1.10.1)
|
111
|
+
nenv (0.1.1)
|
99
112
|
net-scp (1.1.2)
|
100
113
|
net-ssh (>= 2.6.5)
|
114
|
+
net-sftp (2.1.2)
|
115
|
+
net-ssh (>= 2.6.5)
|
101
116
|
net-ssh (2.9.1)
|
102
|
-
|
117
|
+
netrc (0.10.2)
|
118
|
+
nokogiri (1.6.3.1)
|
103
119
|
mini_portile (= 0.6.0)
|
104
120
|
nori (1.1.5)
|
105
|
-
|
106
|
-
|
107
|
-
|
121
|
+
notiffany (0.0.2)
|
122
|
+
nenv (~> 0.1)
|
123
|
+
shellany (~> 0.0)
|
124
|
+
pry (0.10.1)
|
125
|
+
coderay (~> 1.1.0)
|
126
|
+
method_source (~> 0.8.1)
|
108
127
|
slop (~> 3.4)
|
109
|
-
rack (1.
|
110
|
-
rake (10.
|
128
|
+
rack (1.6.0)
|
129
|
+
rake (10.4.2)
|
111
130
|
rb-fsevent (0.9.4)
|
112
131
|
rb-inotify (0.9.5)
|
113
132
|
ffi (>= 0.5.0)
|
114
133
|
rb-kqueue (0.2.3)
|
115
134
|
ffi (>= 0.5.0)
|
116
|
-
rest-client (1.
|
117
|
-
mime-types (>= 1.16)
|
135
|
+
rest-client (1.7.2)
|
136
|
+
mime-types (>= 1.16, < 3.0)
|
137
|
+
netrc (~> 0.7)
|
118
138
|
rspec (2.99.0)
|
119
139
|
rspec-core (~> 2.99.0)
|
120
140
|
rspec-expectations (~> 2.99.0)
|
121
141
|
rspec-mocks (~> 2.99.0)
|
122
|
-
rspec-core (2.99.
|
123
|
-
rspec-expectations (2.99.
|
142
|
+
rspec-core (2.99.2)
|
143
|
+
rspec-expectations (2.99.2)
|
124
144
|
diff-lcs (>= 1.1.3, < 2.0)
|
125
|
-
rspec-mocks (2.99.
|
145
|
+
rspec-mocks (2.99.2)
|
126
146
|
rubyntlm (0.1.1)
|
127
147
|
savon (0.9.5)
|
128
148
|
akami (~> 1.0)
|
@@ -132,18 +152,20 @@ GEM
|
|
132
152
|
nokogiri (>= 1.4.0)
|
133
153
|
nori (~> 1.0)
|
134
154
|
wasabi (~> 1.0)
|
135
|
-
|
155
|
+
shellany (0.0.1)
|
156
|
+
simplecov (0.9.1)
|
136
157
|
docile (~> 1.1.0)
|
137
|
-
multi_json
|
158
|
+
multi_json (~> 1.0)
|
138
159
|
simplecov-html (~> 0.8.0)
|
139
160
|
simplecov-html (0.8.0)
|
140
|
-
slop (3.
|
161
|
+
slop (3.6.0)
|
141
162
|
term-ansicolor (1.3.0)
|
142
163
|
tins (~> 1.0)
|
143
164
|
thor (0.18.1)
|
144
|
-
timers (
|
145
|
-
|
146
|
-
|
165
|
+
timers (4.0.1)
|
166
|
+
hitimes
|
167
|
+
tins (1.3.3)
|
168
|
+
uuidtools (2.1.5)
|
147
169
|
vagrant-omnibus (1.4.1)
|
148
170
|
wasabi (1.0.0)
|
149
171
|
nokogiri (>= 1.4.0)
|
data/README.md
CHANGED
@@ -2,47 +2,38 @@
|
|
2
2
|
|
3
3
|
[](https://travis-ci.org/fgrehm/vagrant-lxc) [](http://badge.fury.io/rb/vagrant-lxc) [](https://codeclimate.com/github/fgrehm/vagrant-lxc) [](https://coveralls.io/r/fgrehm/vagrant-lxc) [](https://www.gittip.com/fgrehm/) [](https://gitter.im/fgrehm/vagrant-lxc)
|
4
4
|
|
5
|
-
[LXC](http://lxc.sourceforge.net/) provider for [Vagrant](http://www.vagrantup.com/) 1.
|
5
|
+
[LXC](http://lxc.sourceforge.net/) provider for [Vagrant](http://www.vagrantup.com/) 1.6+
|
6
6
|
|
7
7
|
This is a Vagrant plugin that allows it to control and provision Linux Containers
|
8
8
|
as an alternative to the built in VirtualBox provider for Linux hosts. Check out
|
9
9
|
[this blog post](http://fabiorehm.com/blog/2013/04/28/lxc-provider-for-vagrant/)
|
10
10
|
to see it in action.
|
11
11
|
|
12
|
-
**NOTICE:** The master branch is targetting an initial beta for 1.0.0, for the
|
13
|
-
latest stable version of the plugin, please check the [0.8-stable](https://github.com/fgrehm/vagrant-lxc/tree/0.8-stable)
|
14
|
-
branch.
|
15
|
-
|
16
12
|
|
17
13
|
## Features
|
18
14
|
|
19
15
|
* Provides the same workflow as the Vagrant VirtualBox provider
|
20
16
|
* Port forwarding via [`redir`](http://linux.die.net/man/1/redir)
|
21
|
-
|
22
|
-
As of now, it does not support public / private networks, but [private networks](https://github.com/fgrehm/vagrant-lxc/issues/120)
|
23
|
-
will be coming along with the final 1.0.0 release.
|
17
|
+
* Private networking via [`pipework`](https://github.com/jpetazzo/pipework)
|
24
18
|
|
25
19
|
## Requirements
|
26
20
|
|
27
|
-
* [Vagrant 1.
|
21
|
+
* [Vagrant 1.5+](http://www.vagrantup.com/downloads.html) (tested with 1.7.2)
|
28
22
|
* lxc 0.7.5+
|
29
23
|
* `redir` (if you are planning to use port forwarding)
|
24
|
+
* `brctl` (if you are planning to use private networks, on Ubuntu this means `apt-get install bridge-utils`)
|
30
25
|
* A [kernel != 3.5.0-17.28](https://github.com/fgrehm/vagrant-lxc/wiki/Troubleshooting#wiki-im-unable-to-restart-containers)
|
31
26
|
|
32
27
|
The plugin is known to work better and pretty much out of the box on Ubuntu 14.04+
|
33
28
|
hosts and installing the dependencies on it basically means a `apt-get install lxc lxc-templates cgroup-lite redir`
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
[additional configurations to work](#backingstore-options).
|
29
|
+
(older LXC versions like 0.7.5 shipped with Ubuntu 12.04 by default might require
|
30
|
+
[additional configurations to work](#backingstore-options)). For setting up other
|
31
|
+
types of hosts please have a look at the [Wiki](https://github.com/fgrehm/vagrant-lxc/wiki).
|
38
32
|
|
39
33
|
If you are on a Mac or Windows machine, you might want to have a look at [this](http://the.taoofmac.com/space/HOWTO/Vagrant)
|
40
34
|
blog post for some ideas on how to set things up or check out [this other repo](https://github.com/fgrehm/vagrant-lxc-vbox-hosts)
|
41
35
|
for a set of Vagrant VirtualBox machines ready for vagrant-lxc usage.
|
42
36
|
|
43
|
-
**NOTE: Some users have been experiencing networking issues and right now you might need to
|
44
|
-
disable checksum offloading as described on [this comment](https://github.com/fgrehm/vagrant-lxc/issues/153#issuecomment-26441273)**
|
45
|
-
|
46
37
|
|
47
38
|
## Installation
|
48
39
|
|
@@ -58,27 +49,25 @@ vagrant init fgrehm/precise64-lxc
|
|
58
49
|
vagrant up --provider=lxc
|
59
50
|
```
|
60
51
|
|
61
|
-
|
62
|
-
|
63
|
-
|
52
|
+
_More information about skipping the `--provider` argument can be found at the
|
53
|
+
"DEFAULT PROVIDER" section of [Vagrant docs](https://docs.vagrantup.com/v2/providers/basic_usage.html)_
|
64
54
|
|
65
55
|
## Base boxes
|
66
56
|
|
67
|
-
Base boxes can be found on [
|
57
|
+
Base boxes can be found on [Atlas](https://atlas.hashicorp.com/boxes/search?provider=lxc)
|
68
58
|
and some scripts to build your own are available at [fgrehm/vagrant-lxc-base-boxes](https://github.com/fgrehm/vagrant-lxc-base-boxes).
|
69
59
|
|
70
60
|
If you want to build your own boxes, please have a look at [`BOXES.md`](https://github.com/fgrehm/vagrant-lxc/tree/master/BOXES.md)
|
71
61
|
for more information.
|
72
62
|
|
73
|
-
|
74
63
|
## Advanced configuration
|
75
64
|
|
76
|
-
|
77
|
-
|
65
|
+
You can modify container configurations from within your Vagrantfile using the
|
66
|
+
[provider block](http://docs.vagrantup.com/v2/providers/configuration.html):
|
78
67
|
|
79
68
|
```ruby
|
80
69
|
Vagrant.configure("2") do |config|
|
81
|
-
config.vm.box = "
|
70
|
+
config.vm.box = "fgrehm/trusty64-lxc"
|
82
71
|
config.vm.provider :lxc do |lxc|
|
83
72
|
# Same effect as 'customize ["modifyvm", :id, "--memory", "1024"]' for VirtualBox
|
84
73
|
lxc.customize 'cgroup.memory.limit_in_bytes', '1024M'
|
@@ -92,6 +81,28 @@ prior to starting it.
|
|
92
81
|
|
93
82
|
For other configuration options, please check the [lxc.conf manpages](http://manpages.ubuntu.com/manpages/precise/man5/lxc.conf.5.html).
|
94
83
|
|
84
|
+
### Private Networks [EXPERIMENTAL]
|
85
|
+
|
86
|
+
Starting with vagrant-lxc 1.1.0, there is some rudimentary support for configuring
|
87
|
+
[Private Networks](https://docs.vagrantup.com/v2/networking/private_network.html)
|
88
|
+
by leveraging the [pipework](https://github.com/jpetazzo/pipework) project.
|
89
|
+
|
90
|
+
On its current state, there is a requirement for setting the bridge name that
|
91
|
+
will be created and will allow your machine to comunicate with the container
|
92
|
+
|
93
|
+
For example:
|
94
|
+
|
95
|
+
```ruby
|
96
|
+
Vagrant.configure("2") do |config|
|
97
|
+
config.vm.network "private_network", ip: "192.168.2.100", lxc__bridge_name: 'vlxcbr1'
|
98
|
+
end
|
99
|
+
```
|
100
|
+
|
101
|
+
Will create a new `veth` device for the container and will set up (or reuse)
|
102
|
+
a `vlxcbr1` bridge between your machine and the `veth` device. Once the last
|
103
|
+
vagrant-lxc container attached to the bridge gets `vagrant halt`ed, the plugin
|
104
|
+
will delete the bridge.
|
105
|
+
|
95
106
|
### Container naming
|
96
107
|
|
97
108
|
By default vagrant-lxc will attempt to generate a unique container name
|
@@ -109,6 +120,9 @@ Vagrant.configure("2") do |config|
|
|
109
120
|
end
|
110
121
|
```
|
111
122
|
|
123
|
+
_Please note that there is a 64 chars limit and the container name will be
|
124
|
+
trimmed down to that to ensure we can always bring the container up.
|
125
|
+
|
112
126
|
### Backingstore options
|
113
127
|
|
114
128
|
Support for setting `lxc-create`'s backingstore option (`-B` and related) can be
|
@@ -139,12 +153,12 @@ Vagrant.configure("2") do |config|
|
|
139
153
|
end
|
140
154
|
```
|
141
155
|
|
142
|
-
|
156
|
+
## Avoiding `sudo` passwords
|
143
157
|
|
144
158
|
This plugin requires **a lot** of `sudo`ing since [user namespaces](https://wiki.ubuntu.com/UserNamespace)
|
145
|
-
|
146
|
-
|
147
|
-
|
159
|
+
is not supported yet. To work around that, you can use the `vagrant lxc sudoers`
|
160
|
+
command which will create a file under `/etc/sudoers.d/vagrant-lxc` whitelisting
|
161
|
+
all commands required by `vagrant-lxc` to run.
|
148
162
|
|
149
163
|
If you are interested on what will be generated by that command, please check
|
150
164
|
[this code](lib/vagrant-lxc/command/sudoers.rb).
|
data/lib/vagrant-lxc/action.rb
CHANGED
@@ -8,23 +8,15 @@ require 'vagrant-lxc/action/fetch_ip_with_lxc_attach'
|
|
8
8
|
require 'vagrant-lxc/action/fetch_ip_from_dnsmasq_leases'
|
9
9
|
require 'vagrant-lxc/action/forced_halt'
|
10
10
|
require 'vagrant-lxc/action/forward_ports'
|
11
|
+
require 'vagrant-lxc/action/gc_private_network_bridges'
|
11
12
|
require 'vagrant-lxc/action/handle_box_metadata'
|
12
13
|
require 'vagrant-lxc/action/prepare_nfs_settings'
|
13
14
|
require 'vagrant-lxc/action/prepare_nfs_valid_ids'
|
15
|
+
require 'vagrant-lxc/action/private_networks'
|
14
16
|
require 'vagrant-lxc/action/remove_temporary_files'
|
15
17
|
require 'vagrant-lxc/action/setup_package_files'
|
16
18
|
require 'vagrant-lxc/action/warn_networks'
|
17
19
|
|
18
|
-
unless Vagrant::Backports.vagrant_1_3_or_later?
|
19
|
-
require 'vagrant-backports/action/wait_for_communicator'
|
20
|
-
end
|
21
|
-
unless Vagrant::Backports.vagrant_1_5_or_later?
|
22
|
-
require 'vagrant-backports/ui'
|
23
|
-
require 'vagrant-backports/action/handle_box'
|
24
|
-
require 'vagrant-backports/action/message'
|
25
|
-
require 'vagrant-backports/action/is_state'
|
26
|
-
end
|
27
|
-
|
28
20
|
module Vagrant
|
29
21
|
module LXC
|
30
22
|
module Action
|
@@ -57,18 +49,14 @@ module Vagrant
|
|
57
49
|
b.use Builtin::Provision
|
58
50
|
b.use Builtin::EnvSet, :port_collision_repair => true
|
59
51
|
b.use Builtin::HandleForwardedPortCollisions
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
b.use PrepareNFSSettings
|
65
|
-
else
|
66
|
-
require 'vagrant-lxc/backports/action/share_folders'
|
67
|
-
b.use ShareFolders
|
68
|
-
end
|
52
|
+
b.use PrepareNFSValidIds
|
53
|
+
b.use Builtin::SyncedFolderCleanup
|
54
|
+
b.use Builtin::SyncedFolders
|
55
|
+
b.use PrepareNFSSettings
|
69
56
|
b.use Builtin::SetHostname
|
70
57
|
b.use WarnNetworks
|
71
58
|
b.use ForwardPorts
|
59
|
+
b.use PrivateNetworks
|
72
60
|
b.use Boot
|
73
61
|
b.use Builtin::WaitForCommunicator
|
74
62
|
end
|
@@ -139,6 +127,7 @@ module Vagrant
|
|
139
127
|
|
140
128
|
b2.use ClearForwardedPorts
|
141
129
|
b2.use RemoveTemporaryFiles
|
130
|
+
b2.use GcPrivateNetworkBridges
|
142
131
|
b2.use Builtin::Call, Builtin::GracefulHalt, :stopped, :running do |env2, b3|
|
143
132
|
if !env2[:result]
|
144
133
|
b3.use ForcedHalt
|
@@ -158,16 +147,13 @@ module Vagrant
|
|
158
147
|
next
|
159
148
|
end
|
160
149
|
|
161
|
-
# TODO: Use Vagrant's built in action once we drop support for vagrant 1.2
|
162
150
|
b2.use Builtin::Call, DestroyConfirm do |env2, b3|
|
163
151
|
if env2[:result]
|
164
152
|
b3.use Builtin::ConfigValidate
|
165
153
|
b3.use Builtin::EnvSet, :force_halt => true
|
166
154
|
b3.use action_halt
|
167
155
|
b3.use Destroy
|
168
|
-
|
169
|
-
b3.use Builtin::ProvisionerCleanup
|
170
|
-
end
|
156
|
+
b3.use Builtin::ProvisionerCleanup
|
171
157
|
else
|
172
158
|
b3.use Builtin::Message, I18n.t("vagrant_lxc.messages.will_not_destroy")
|
173
159
|
end
|