vagrant-lxc 1.0.0.alpha.1 → 1.0.0.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +68 -23
- data/README.md +54 -27
- data/lib/vagrant-lxc.rb +4 -0
- data/lib/vagrant-lxc/action/boot.rb +6 -0
- data/lib/vagrant-lxc/action/clear_forwarded_ports.rb +9 -4
- data/lib/vagrant-lxc/action/create.rb +4 -1
- data/lib/vagrant-lxc/action/fetch_ip_from_dnsmasq_leases.rb +1 -1
- data/lib/vagrant-lxc/action/forward_ports.rb +5 -2
- data/lib/vagrant-lxc/command/sudoers.rb +156 -52
- data/lib/vagrant-lxc/config.rb +15 -19
- data/lib/vagrant-lxc/driver.rb +32 -23
- data/lib/vagrant-lxc/driver/cli.rb +3 -1
- data/lib/vagrant-lxc/provider.rb +3 -2
- data/lib/vagrant-lxc/sudo_wrapper.rb +2 -11
- data/lib/vagrant-lxc/synced_folder.rb +9 -0
- data/lib/vagrant-lxc/version.rb +1 -1
- data/scripts/lxc-template +11 -5
- data/spec/unit/action/forward_ports_spec.rb +31 -1
- data/spec/unit/driver/cli_spec.rb +10 -6
- data/spec/unit/driver_spec.rb +20 -12
- metadata +3 -10
- data/development/Vagrantfile +0 -92
- data/development/lxc-configs/lxc-dev-box +0 -37
- data/development/lxc-configs/sid +0 -37
- data/development/lxc-configs/squeeze +0 -37
- data/development/lxc-configs/vbox +0 -37
- data/development/lxc-configs/wheezy +0 -37
- data/development/site.pp +0 -151
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f16ecc96c3d6f94a025db26d4fa9acfdbd29f153
|
4
|
+
data.tar.gz: 67475bf75d68f60d9a45f913258fc08e4d3d57c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43322e18345da08c92c6beb2a0a8c38cf33dacd4b6b2f05c4222333a23c2e6a39ad25a4fa61d022355d8ab3b6e57de7bbfe0b7d83958a56b5c71d5131038a30c
|
7
|
+
data.tar.gz: ee9ed4e6f30c100a21a07e57bc7eb9ee83f88aa12d8e8d8927e0dff8b26bf5f9bdeb5f05cf72e8c3ffc8f0bc7763531342fd5de660ef38326a61acbcd26aaa40
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,42 @@
|
|
1
|
-
## [1.0.0.alpha.
|
1
|
+
## [1.0.0.alpha.2](https://github.com/fgrehm/vagrant-lxc/compare/v1.0.0.alpha.1...v1.0.0.alpha.2) (May 13, 2014)
|
2
|
+
|
3
|
+
BACKWARDS INCOMPATIBILITIES:
|
4
|
+
|
5
|
+
- The `sudo_wrapper` provider configuration was removed in favor of using the
|
6
|
+
secure wrapper generated by `vagrant lxc sudoers` [[GH-272]]
|
7
|
+
- Support for specifying backingstore parameters from `Vagrantfile`s for `lxc-create`
|
8
|
+
was added and it defaults to the `best` option. On older lxc versions that does not
|
9
|
+
support that value, it needs to be set to `none`.
|
10
|
+
|
11
|
+
FEATURES:
|
12
|
+
|
13
|
+
- Add support for specifying backingstore parameters from `Vagrantfile`s [[GH-277]]
|
14
|
+
|
15
|
+
IMPROVEMENTS:
|
16
|
+
|
17
|
+
- Make `dnsmasq` leases MAC address regex check case insensitive [[GH-283]]
|
18
|
+
- Use relative paths for `lxc.mount.entry` to avoid issues with `lxc-clone` [[GH-258]].
|
19
|
+
- Sort synced folders when mounting [[GH-271]]
|
20
|
+
- Privileged ports can now be forwarded with `sudo` [[GH-259]]
|
21
|
+
- The `vagrant lxc sudoers` generated sudoers configuration and wrapper script
|
22
|
+
are safer and properly whitelists the commands required by vagrant-lxc to run.
|
23
|
+
[[GH-272]] / [[GH-269]]
|
24
|
+
|
25
|
+
BUG FIXES:
|
26
|
+
|
27
|
+
- Fix `lxc-create` issues with pre 1.0.0 versions [[GH-282]]
|
28
|
+
|
29
|
+
[GH-283]: https://github.com/fgrehm/vagrant-lxc/pull/283
|
30
|
+
[GH-282]: https://github.com/fgrehm/vagrant-lxc/pull/282
|
31
|
+
[GH-269]: https://github.com/fgrehm/vagrant-lxc/issues/269
|
32
|
+
[GH-272]: https://github.com/fgrehm/vagrant-lxc/pull/272
|
33
|
+
[GH-259]: https://github.com/fgrehm/vagrant-lxc/pull/259
|
34
|
+
[GH-271]: https://github.com/fgrehm/vagrant-lxc/pull/271
|
35
|
+
[GH-277]: https://github.com/fgrehm/vagrant-lxc/pull/277
|
36
|
+
[GH-258]: https://github.com/fgrehm/vagrant-lxc/issues/258
|
37
|
+
|
38
|
+
|
39
|
+
## [1.0.0.alpha.1](https://github.com/fgrehm/vagrant-lxc/compare/v0.8.0...v1.0.0.alpha.1) (Apr 06, 2014)
|
2
40
|
|
3
41
|
DEPRECATIONS:
|
4
42
|
|
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: 6e160ba4cbfc197f8fff1db385fb9d6b9463eba1
|
4
4
|
specs:
|
5
|
-
vagrant-cachier (0.
|
5
|
+
vagrant-cachier (0.7.2)
|
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: c0dafc996165bf1628b672dd533f1858ff66fe4a
|
16
16
|
specs:
|
17
17
|
vagrant-spec (0.0.1)
|
18
18
|
childprocess (~> 0.5.0)
|
@@ -22,32 +22,39 @@ GIT
|
|
22
22
|
|
23
23
|
GIT
|
24
24
|
remote: https://github.com/mitchellh/vagrant.git
|
25
|
-
revision:
|
26
|
-
tag: v1.5.1
|
25
|
+
revision: 9475ed9a50650b88db444ac07a7034775d3b814e
|
27
26
|
specs:
|
28
|
-
vagrant (1.
|
29
|
-
bundler (
|
27
|
+
vagrant (1.6.2)
|
28
|
+
bundler (>= 1.5.2, < 1.7.0)
|
30
29
|
childprocess (~> 0.5.0)
|
31
30
|
erubis (~> 2.7.0)
|
32
31
|
i18n (~> 0.6.0)
|
33
|
-
listen (~> 2.
|
32
|
+
listen (~> 2.7.1)
|
34
33
|
log4r (~> 1.1.9, < 1.1.11)
|
35
34
|
net-scp (~> 1.1.0)
|
36
|
-
net-ssh (>= 2.6.6, < 2.
|
35
|
+
net-ssh (>= 2.6.6, < 2.10.0)
|
37
36
|
rb-kqueue (~> 0.2.0)
|
38
37
|
wdm (~> 0.1.0)
|
38
|
+
winrm (~> 1.1.3)
|
39
39
|
|
40
40
|
PATH
|
41
41
|
remote: .
|
42
42
|
specs:
|
43
|
-
vagrant-lxc (1.0.0.alpha.
|
43
|
+
vagrant-lxc (1.0.0.alpha.2)
|
44
44
|
|
45
45
|
GEM
|
46
46
|
remote: https://rubygems.org/
|
47
47
|
specs:
|
48
|
+
akami (1.2.2)
|
49
|
+
gyoku (>= 0.4.0)
|
50
|
+
nokogiri
|
51
|
+
builder (3.2.2)
|
48
52
|
celluloid (0.15.2)
|
49
53
|
timers (~> 1.1.0)
|
50
|
-
|
54
|
+
celluloid-io (0.15.0)
|
55
|
+
celluloid (>= 0.15.0)
|
56
|
+
nio4r (>= 0.5.0)
|
57
|
+
childprocess (0.5.3)
|
51
58
|
ffi (~> 1.0, >= 1.0.11)
|
52
59
|
coderay (1.1.0)
|
53
60
|
coveralls (0.7.0)
|
@@ -61,35 +68,53 @@ GEM
|
|
61
68
|
erubis (2.7.0)
|
62
69
|
ffi (1.9.3)
|
63
70
|
formatador (0.2.4)
|
64
|
-
|
71
|
+
gssapi (1.0.3)
|
72
|
+
ffi (>= 1.0.1)
|
73
|
+
guard (2.6.1)
|
65
74
|
formatador (>= 0.2.4)
|
66
|
-
listen (~> 2.
|
75
|
+
listen (~> 2.7)
|
67
76
|
lumberjack (~> 1.0)
|
68
77
|
pry (>= 0.9.12)
|
69
78
|
thor (>= 0.18.1)
|
70
|
-
guard-rspec (4.2.
|
79
|
+
guard-rspec (4.2.9)
|
71
80
|
guard (~> 2.1)
|
72
81
|
rspec (>= 2.14, < 4.0)
|
82
|
+
gyoku (1.1.1)
|
83
|
+
builder (>= 2.1.2)
|
84
|
+
httpclient (2.3.4.1)
|
85
|
+
httpi (0.9.7)
|
86
|
+
rack
|
73
87
|
i18n (0.6.9)
|
74
|
-
listen (2.4
|
88
|
+
listen (2.7.4)
|
75
89
|
celluloid (>= 0.15.2)
|
90
|
+
celluloid-io (>= 0.15.0)
|
76
91
|
rb-fsevent (>= 0.9.3)
|
77
92
|
rb-inotify (>= 0.9)
|
93
|
+
little-plugger (1.1.3)
|
78
94
|
log4r (1.1.10)
|
79
|
-
|
95
|
+
logging (1.8.2)
|
96
|
+
little-plugger (>= 1.1.3)
|
97
|
+
multi_json (>= 1.8.4)
|
98
|
+
lumberjack (1.0.5)
|
80
99
|
method_source (0.8.2)
|
81
|
-
mime-types (2.
|
82
|
-
|
100
|
+
mime-types (2.2)
|
101
|
+
mini_portile (0.5.3)
|
102
|
+
multi_json (1.10.0)
|
83
103
|
net-scp (1.1.2)
|
84
104
|
net-ssh (>= 2.6.5)
|
85
|
-
net-ssh (2.
|
105
|
+
net-ssh (2.9.0)
|
106
|
+
nio4r (1.0.0)
|
107
|
+
nokogiri (1.6.2)
|
108
|
+
mini_portile (~> 0.5.2)
|
109
|
+
nori (1.1.5)
|
86
110
|
pry (0.9.12.6)
|
87
111
|
coderay (~> 1.0)
|
88
112
|
method_source (~> 0.8)
|
89
113
|
slop (~> 3.4)
|
90
|
-
|
114
|
+
rack (1.5.2)
|
115
|
+
rake (10.3.1)
|
91
116
|
rb-fsevent (0.9.4)
|
92
|
-
rb-inotify (0.9.
|
117
|
+
rb-inotify (0.9.4)
|
93
118
|
ffi (>= 0.5.0)
|
94
119
|
rb-kqueue (0.2.2)
|
95
120
|
ffi (>= 0.5.0)
|
@@ -103,6 +128,15 @@ GEM
|
|
103
128
|
rspec-expectations (2.99.0.beta2)
|
104
129
|
diff-lcs (>= 1.1.3, < 2.0)
|
105
130
|
rspec-mocks (2.99.0.beta2)
|
131
|
+
rubyntlm (0.1.1)
|
132
|
+
savon (0.9.5)
|
133
|
+
akami (~> 1.0)
|
134
|
+
builder (>= 2.1.2)
|
135
|
+
gyoku (>= 0.4.0)
|
136
|
+
httpi (~> 0.9)
|
137
|
+
nokogiri (>= 1.4.0)
|
138
|
+
nori (~> 1.0)
|
139
|
+
wasabi (~> 1.0)
|
106
140
|
simplecov (0.8.2)
|
107
141
|
docile (~> 1.1.0)
|
108
142
|
multi_json
|
@@ -113,9 +147,20 @@ GEM
|
|
113
147
|
tins (~> 1.0)
|
114
148
|
thor (0.18.1)
|
115
149
|
timers (1.1.0)
|
116
|
-
tins (1.
|
117
|
-
|
150
|
+
tins (1.2.0)
|
151
|
+
uuidtools (2.1.4)
|
152
|
+
vagrant-omnibus (1.4.1)
|
153
|
+
wasabi (1.0.0)
|
154
|
+
nokogiri (>= 1.4.0)
|
118
155
|
wdm (0.1.0)
|
156
|
+
winrm (1.1.3)
|
157
|
+
gssapi (~> 1.0.0)
|
158
|
+
httpclient (~> 2.2, >= 2.2.0.2)
|
159
|
+
logging (~> 1.6, >= 1.6.1)
|
160
|
+
nokogiri (~> 1.5)
|
161
|
+
rubyntlm (~> 0.1.1)
|
162
|
+
savon (= 0.9.5)
|
163
|
+
uuidtools (~> 2.1.2)
|
119
164
|
|
120
165
|
PLATFORMS
|
121
166
|
ruby
|
data/README.md
CHANGED
@@ -13,13 +13,6 @@ to see it in action.
|
|
13
13
|
latest stable version of the plugin, please check the [0.8-stable](https://github.com/fgrehm/vagrant-lxc/tree/0.8-stable)
|
14
14
|
branch.
|
15
15
|
|
16
|
-
## Usage with Vagrant 1.5
|
17
|
-
|
18
|
-
Usage with the recently released Vagrant 1.5 is only possible by [building the
|
19
|
-
plugin from sources](https://github.com/fgrehm/vagrant-lxc/wiki/Development#wiki-installing-the-plugin-from-source).
|
20
|
-
The 1.0.0.beta1 version of the plugin that will ship with the changes required
|
21
|
-
is expected to be released by April, 2014.
|
22
|
-
|
23
16
|
|
24
17
|
## Features
|
25
18
|
|
@@ -36,15 +29,12 @@ will be coming along _soon_.
|
|
36
29
|
* `redir` (if you are planning to use port forwarding)
|
37
30
|
* A [kernel != 3.5.0-17.28](https://github.com/fgrehm/vagrant-lxc/wiki/Troubleshooting#wiki-im-unable-to-restart-containers)
|
38
31
|
|
39
|
-
The plugin is known to work better and pretty much out of the box on Ubuntu
|
32
|
+
The plugin is known to work better and pretty much out of the box on Ubuntu 14.04+
|
40
33
|
hosts and installing the dependencies on it basically means a `apt-get install lxc lxc-templates cgroup-lite redir`
|
41
34
|
and a `apt-get update && apt-get dist-upgrade` to upgrade the kernel. For Debian
|
42
|
-
hosts you'll need to follow the instructions described on the [Wiki](https://github.com/fgrehm/vagrant-lxc/wiki/Usage-on-debian-hosts)
|
43
|
-
|
44
|
-
|
45
|
-
plugin, please check [the wiki](https://github.com/fgrehm/vagrant-lxc/wiki/Usage-on-Linode)
|
46
|
-
for more information. Documentation on how to set things up for other distros
|
47
|
-
[are welcome](https://github.com/fgrehm/vagrant-lxc/wiki) :)
|
35
|
+
hosts you'll need to follow the instructions described on the [Wiki](https://github.com/fgrehm/vagrant-lxc/wiki/Usage-on-debian-hosts)
|
36
|
+
and old lxc versions (like 0.7.5 shipped with Ubuntu 12.04 by default) might require
|
37
|
+
[additional configurations to work](#backingstore-options).
|
48
38
|
|
49
39
|
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)
|
50
40
|
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)
|
@@ -56,6 +46,14 @@ disable checksum offloading as described on [this comment](https://github.com/fg
|
|
56
46
|
|
57
47
|
## Installation
|
58
48
|
|
49
|
+
On Vagrant 1.5+:
|
50
|
+
|
51
|
+
```
|
52
|
+
vagrant plugin install vagrant-lxc --plugin-version 1.0.0.alpha.2
|
53
|
+
```
|
54
|
+
|
55
|
+
On Vagrant < 1.5:
|
56
|
+
|
59
57
|
```
|
60
58
|
vagrant plugin install vagrant-lxc
|
61
59
|
```
|
@@ -82,7 +80,16 @@ environmental variable to `lxc` in order to avoid typing `--provider=lxc` all
|
|
82
80
|
the time.
|
83
81
|
|
84
82
|
|
85
|
-
|
83
|
+
## Base boxes
|
84
|
+
|
85
|
+
Base boxes can be found on [VagrantCloud](https://vagrantcloud.com/search?provider=lxc)
|
86
|
+
and some scripts to build your own are available at [fgrehm/vagrant-lxc-base-boxes](https://github.com/fgrehm/vagrant-lxc-base-boxes).
|
87
|
+
|
88
|
+
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)
|
89
|
+
for more information.
|
90
|
+
|
91
|
+
|
92
|
+
## Advanced configuration
|
86
93
|
|
87
94
|
If you want, you can modify container configurations from within your Vagrantfile
|
88
95
|
using the [provider block](http://docs.vagrantup.com/v2/providers/configuration.html):
|
@@ -111,8 +118,6 @@ for you. However, if the container name is important to you, you may use the
|
|
111
118
|
|
112
119
|
```ruby
|
113
120
|
Vagrant.configure("2") do |config|
|
114
|
-
config.vm.box = "quantal64"
|
115
|
-
|
116
121
|
config.vm.define "db" do |node|
|
117
122
|
node.vm.provider :lxc do |lxc|
|
118
123
|
lxc.container_name = :machine # Sets the container name to 'db'
|
@@ -122,26 +127,48 @@ Vagrant.configure("2") do |config|
|
|
122
127
|
end
|
123
128
|
```
|
124
129
|
|
130
|
+
### Backingstore options
|
131
|
+
|
132
|
+
Support for setting `lxc-create`'s backingstore option (`-B` and related) can be
|
133
|
+
specified from the provider block and it defaults to `best`, to change it:
|
134
|
+
|
135
|
+
```ruby
|
136
|
+
Vagrant.configure("2") do |config|
|
137
|
+
config.vm.provider :lxc do |lxc|
|
138
|
+
lxc.backingstore = 'lvm' # or 'btrfs',...
|
139
|
+
# lvm specific options
|
140
|
+
lxc.backingstore_option '--vgname', 'schroots'
|
141
|
+
lxc.backingstore_option '--fssize', '5G'
|
142
|
+
lxc.backingstore_option '--fstype', 'xfs'
|
143
|
+
end
|
144
|
+
end
|
145
|
+
```
|
146
|
+
|
147
|
+
For old versions of lxc (like 0.7.5 shipped with Ubuntu 12.04 by default) that
|
148
|
+
does not support `best` for the backingstore option, changing it to `none` is
|
149
|
+
required and a default for all Vagrant environments can be set from your
|
150
|
+
`~/.vagrant.d/Vagrantfile` using the same `provider` block:
|
151
|
+
|
152
|
+
```ruby
|
153
|
+
Vagrant.configure("2") do |config|
|
154
|
+
config.vm.provider :lxc do |lxc|
|
155
|
+
lxc.backingstore = 'none'
|
156
|
+
end
|
157
|
+
end
|
158
|
+
```
|
159
|
+
|
125
160
|
### Avoiding `sudo` passwords
|
126
161
|
|
127
162
|
This plugin requires **a lot** of `sudo`ing since [user namespaces](https://wiki.ubuntu.com/UserNamespace)
|
128
163
|
are not supported on mainstream kernels. To work around that, you can use the
|
129
|
-
`vagrant lxc sudoers` command which will create a file under `/etc/sudoers.d/vagrant-lxc-<
|
164
|
+
`vagrant lxc sudoers` command which will create a file under `/etc/sudoers.d/vagrant-lxc-<VERSION>`
|
130
165
|
whitelisting all commands required by `vagrant-lxc` to run.
|
131
166
|
|
132
167
|
If you are interested on what will be generated by that command, please check
|
133
|
-
[this code](lib/vagrant-lxc/commands/sudoers.rb
|
168
|
+
[this code](lib/vagrant-lxc/commands/sudoers.rb).
|
134
169
|
|
135
170
|
_vagrant-lxc < 1.0.0 users, please check this [Wiki page](https://github.com/fgrehm/vagrant-lxc/wiki/Avoiding-%27sudo%27-passwords)_
|
136
171
|
|
137
|
-
### Base boxes
|
138
|
-
|
139
|
-
Base boxes can be found on [VagrantCloud](https://vagrantcloud.com/search?provider=lxc)
|
140
|
-
and some scripts to build your own are available at [fgrehm/vagrant-lxc-base-boxes](https://github.com/fgrehm/vagrant-lxc-base-boxes).
|
141
|
-
|
142
|
-
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)
|
143
|
-
for more information.
|
144
|
-
|
145
172
|
|
146
173
|
## More information
|
147
174
|
|
data/lib/vagrant-lxc.rb
CHANGED
@@ -14,6 +14,12 @@ module Vagrant
|
|
14
14
|
utsname = env[:machine].config.vm.hostname || env[:machine].id
|
15
15
|
config.customize 'utsname', utsname
|
16
16
|
|
17
|
+
# Fix apparmor issues when starting Ubuntu 14.04 containers
|
18
|
+
# See https://github.com/fgrehm/vagrant-lxc/issues/278 for more information
|
19
|
+
if Dir.exists?('/sys/fs/pstore')
|
20
|
+
config.customize 'mount.entry', '/sys/fs/pstore sys/fs/pstore none bind,optional 0 0'
|
21
|
+
end
|
22
|
+
|
17
23
|
env[:ui].info I18n.t("vagrant_lxc.messages.starting")
|
18
24
|
env[:machine].provider.driver.start(config.customizations)
|
19
25
|
|
@@ -13,9 +13,13 @@ module Vagrant
|
|
13
13
|
if redir_pids.any?
|
14
14
|
env[:ui].info I18n.t("vagrant.actions.vm.clear_forward_ports.deleting")
|
15
15
|
redir_pids.each do |pid|
|
16
|
-
next unless is_redir_pid?(pid)
|
17
|
-
@logger.debug "Killing pid #{pid}"
|
18
|
-
|
16
|
+
next unless is_redir_pid?(pid[0])
|
17
|
+
@logger.debug "Killing pid #{pid[0]}"
|
18
|
+
if pid[1]
|
19
|
+
system "sudo pkill -TERM -P #{pid[0]}"
|
20
|
+
else
|
21
|
+
system "pkill -TERM -P #{pid[0]}"
|
22
|
+
end
|
19
23
|
end
|
20
24
|
|
21
25
|
@logger.info "Removing redir pids files"
|
@@ -31,7 +35,8 @@ module Vagrant
|
|
31
35
|
|
32
36
|
def redir_pids
|
33
37
|
@redir_pids = Dir[@env[:machine].data_dir.join('pids').to_s + "/redir_*.pid"].map do |file|
|
34
|
-
File.
|
38
|
+
port_number = File.basename(file).split(/[^\d]/).join
|
39
|
+
[ File.read(file).strip.chomp , Integer(port_number) <= 1024 ]
|
35
40
|
end
|
36
41
|
end
|
37
42
|
|
@@ -7,7 +7,8 @@ module Vagrant
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def call(env)
|
10
|
-
|
10
|
+
config = env[:machine].provider_config
|
11
|
+
container_name = config.container_name
|
11
12
|
|
12
13
|
case container_name
|
13
14
|
when :machine
|
@@ -24,6 +25,8 @@ module Vagrant
|
|
24
25
|
|
25
26
|
env[:machine].provider.driver.create(
|
26
27
|
container_name,
|
28
|
+
config.backingstore,
|
29
|
+
config.backingstore_options,
|
27
30
|
env[:lxc_template_src],
|
28
31
|
env[:lxc_template_config],
|
29
32
|
env[:lxc_template_opts]
|
@@ -19,7 +19,7 @@ module Vagrant
|
|
19
19
|
dnsmasq_leases = read_dnsmasq_leases
|
20
20
|
@logger.debug "Attempting to load ip from dnsmasq leases (mac: #{mac_address})"
|
21
21
|
@logger.debug dnsmasq_leases
|
22
|
-
if dnsmasq_leases =~ /#{Regexp.escape mac_address}\s+([0-9.]+)\s+/
|
22
|
+
if dnsmasq_leases =~ /#{Regexp.escape mac_address.to_s}\s+([0-9.]+)\s+/i
|
23
23
|
ip = $1.to_s
|
24
24
|
break
|
25
25
|
else
|