vagrant-lxc 0.0.2 → 0.0.3
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 +6 -14
- data/Gemfile.lock +1 -1
- data/README.md +22 -27
- data/development/shell-provisioning/upgrade-kernel +1 -1
- data/development/site.pp +1 -2
- data/lib/vagrant-lxc/action.rb +2 -0
- data/lib/vagrant-lxc/action/disconnect.rb +14 -0
- data/lib/vagrant-lxc/container.rb +6 -52
- data/lib/vagrant-lxc/container/cli.rb +12 -0
- data/lib/vagrant-lxc/version.rb +1 -1
- data/spec/fixtures/sample-ifconfig-output +18 -0
- data/spec/spec_helper.rb +1 -3
- data/spec/unit/container/cli_spec.rb +22 -1
- data/spec/unit/container_spec.rb +11 -19
- metadata +8 -9
- data/spec/fixtures/sample-arp-output +0 -4
- data/spec/fixtures/sample-config +0 -47
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
OThkNThlMjU2ZmVkN2E5MjAyYzgxZGM4ZjdlMTBhNGI4Njc0YjYxYjE5ZWYz
|
10
|
-
YmI1YzlmOWQ1ZTU2NzRjOWE2MWY1ODZiNDNmMDNhMzExMmI4YThkNGVkMjBi
|
11
|
-
YmNmYTRjYjRmNjBiNGZiYmU4Y2I5NjE3ZmY4MTQ5YjBhMzQyMmI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
Y2JkM2Y1OGZmMDdkNjE1ZDY1ODQ5YWY1MDNjM2ZmNGRkMjk1YmVkMmVlNjQz
|
14
|
-
OWQyZTg5NzU0ZjhmZWVlYjE3OWIwZDZkZWU3ZmFhNmEwOTFmMGMzYWNlYTgx
|
15
|
-
ZDZjOWEyNDQzY2Y5ZTQzMjY0NGE1M2JmNThlZmNhZTVlNjI0YzM=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bd1975bccf20eba75300c481bdf0278fe909151c
|
4
|
+
data.tar.gz: 6d9d53e02972c5f080aec5f26a750066d695bd57
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7e7803f41a9bb9b45c2656e38711a7180b700f5e11d96d07a2b28c04009f3fc3fc72f63c985a6ade6af446914f7a2e0aa09308d7cbddfa90b24bc03fd88ad3ea
|
7
|
+
data.tar.gz: 3e5ad8c62617b4e385773ff4fec76b14005c53304e4302bd487094cdd77bc0838bc47cbbfec5c4dc9d2b3094111ac4336e157fbffacc736e168cad0c75fc981d
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -4,18 +4,17 @@
|
|
4
4
|
|
5
5
|
Highly experimental Linux Containers support for Vagrant 1.1.
|
6
6
|
|
7
|
-
Please refer to the [closed issues](https://github.com/fgrehm/vagrant-lxc/issues?labels=&milestone=&page=1&state=closed)
|
8
|
-
to find out whats currently supported.
|
9
|
-
|
10
7
|
|
11
8
|
## Dependencies
|
12
9
|
|
13
|
-
|
14
|
-
which on Ubuntu 12.10 means:
|
10
|
+
Vagrant >= 1.1.0, the `lxc` package and a Kernel [higher than 3.5.0-17.28](#help-im-unable-to-restart-containers),
|
11
|
+
which on Ubuntu 12.10 means something like:
|
15
12
|
|
16
13
|
```
|
17
14
|
sudo apt-get update && sudo apt-get dist-upgrade
|
18
|
-
sudo apt-get install lxc
|
15
|
+
sudo apt-get install lxc
|
16
|
+
wget "http://files.vagrantup.com/packages/67bd4d30f7dbefa7c0abc643599f0244986c38c8/vagrant_`uname -m`.deb" -O /tmp/vagrant.deb
|
17
|
+
sudo dpkg -i /tmp/vagrant.deb
|
19
18
|
```
|
20
19
|
|
21
20
|
|
@@ -23,14 +22,16 @@ sudo apt-get install lxc bsdtar fping
|
|
23
22
|
|
24
23
|
* Vagrant's `up`, `halt`, `reload`, `destroy`, and `ssh` commands
|
25
24
|
* Shared folders
|
26
|
-
*
|
25
|
+
* Provisioning with shell scripts and puppet (should work with chef but I [haven't had the chance](https://github.com/fgrehm/vagrant-lxc/issues/37) to set it up on the base box)
|
27
26
|
* Setting container's host name
|
28
|
-
|
27
|
+
|
28
|
+
*Please refer to the [closed issues](https://github.com/fgrehm/vagrant-lxc/issues?labels=&milestone=&page=1&state=closed)
|
29
|
+
for the most up to date list.*
|
29
30
|
|
30
31
|
|
31
32
|
## Current limitations
|
32
33
|
|
33
|
-
* Port forwarding does not work [yet](https://github.com/fgrehm/vagrant-lxc/issues/
|
34
|
+
* Port forwarding does not work [yet](https://github.com/fgrehm/vagrant-lxc/issues/6)
|
34
35
|
* A hell lot of `sudo`s
|
35
36
|
* Only a [single ubuntu box supported](boxes), I'm still [figuring out what should go
|
36
37
|
on the .box file](https://github.com/fgrehm/vagrant-lxc/issues/4)
|
@@ -71,11 +72,8 @@ Vagrant.configure("2") do |config|
|
|
71
72
|
end
|
72
73
|
```
|
73
74
|
|
74
|
-
If you
|
75
|
-
|
76
|
-
fire up the [same Vagrant VirtualBox machine I'm using for development](#using-virtualbox-and-vagrant-10-for-development)
|
77
|
-
to try things out and do the same as above. That might also get you up and running
|
78
|
-
if you are working on a mac or windows host ;)
|
75
|
+
If you are on a mac or window host and still want to try this plugin out, you
|
76
|
+
can use the [same Vagrant VirtualBox machine I use for development](#using-virtualbox-and-vagrant-11-for-development).
|
79
77
|
|
80
78
|
|
81
79
|
## Development
|
@@ -121,6 +119,15 @@ Keep in mind that you'll probably need to run `sudo aa-complain /usr/bin/lxc-sta
|
|
121
119
|
on the host whenever you want to hack on it, otherwise you won't be able to
|
122
120
|
start nested containers there to try things out.
|
123
121
|
|
122
|
+
### Using VirtualBox and Vagrant 1.1 for development
|
123
|
+
|
124
|
+
```
|
125
|
+
cd development
|
126
|
+
ln -s Vagrantfile.1.1 Vagrantfile
|
127
|
+
bundle exec vagrant up vbox
|
128
|
+
bundle exec vagrant reload vbox
|
129
|
+
bundle exec vagrant ssh vbox
|
130
|
+
```
|
124
131
|
|
125
132
|
### Using VirtualBox and Vagrant 1.0 for development
|
126
133
|
|
@@ -132,16 +139,6 @@ vagrant reload
|
|
132
139
|
vagrant ssh
|
133
140
|
```
|
134
141
|
|
135
|
-
### Using VirtualBox and Vagrant 1.1 for development
|
136
|
-
|
137
|
-
```
|
138
|
-
cd development
|
139
|
-
ln -s Vagrantfile.1.1 Vagrantfile
|
140
|
-
bundle exec vagrant up vbox
|
141
|
-
bundle exec vagrant reload vbox
|
142
|
-
bundle exec vagrant ssh vbox
|
143
|
-
```
|
144
|
-
|
145
142
|
|
146
143
|
## Protips
|
147
144
|
|
@@ -157,9 +154,7 @@ This will output A LOT of information on your terminal and some useful informati
|
|
157
154
|
about `lxc-start` to `/tmp/lxc-start.log`.
|
158
155
|
|
159
156
|
|
160
|
-
## Help!
|
161
|
-
|
162
|
-
### I'm unable to restart containers!
|
157
|
+
## Help! I'm unable to restart containers!
|
163
158
|
|
164
159
|
It happened to me quite a few times in the past and it seems that it is related
|
165
160
|
to a bug on linux kernel, so make sure you are using a bug-free kernel
|
@@ -9,6 +9,6 @@ fi
|
|
9
9
|
echo 'An old kernel was found on the guest machine and it will be upgraded' 1>&2
|
10
10
|
echo 'Please reload the box after provisioning when finished' 1>&2
|
11
11
|
sudo apt-get update
|
12
|
-
sudo apt-get install linux-image-3.5.0-
|
12
|
+
sudo apt-get install linux-image-3.5.0-26-generic linux-headers-3.5.0-26-generic -y
|
13
13
|
sudo apt-get dist-upgrade -y
|
14
14
|
sudo apt-get autoremove -y
|
data/development/site.pp
CHANGED
@@ -20,8 +20,7 @@ exec {
|
|
20
20
|
|
21
21
|
# Install dependencies
|
22
22
|
package {
|
23
|
-
[ 'libffi-dev', 'bsdtar', 'exuberant-ctags', 'ruby1.9.1-dev', 'htop', 'git',
|
24
|
-
'build-essential', 'dnsutils', 'fping' ]:
|
23
|
+
[ 'libffi-dev', 'bsdtar', 'exuberant-ctags', 'ruby1.9.1-dev', 'htop', 'git', 'build-essential' ]:
|
25
24
|
ensure => 'installed'
|
26
25
|
;
|
27
26
|
|
data/lib/vagrant-lxc/action.rb
CHANGED
@@ -6,6 +6,7 @@ require 'vagrant-lxc/action/check_running'
|
|
6
6
|
require 'vagrant-lxc/action/create'
|
7
7
|
require 'vagrant-lxc/action/created'
|
8
8
|
require 'vagrant-lxc/action/destroy'
|
9
|
+
require 'vagrant-lxc/action/disconnect'
|
9
10
|
require 'vagrant-lxc/action/forced_halt'
|
10
11
|
require 'vagrant-lxc/action/handle_box_metadata'
|
11
12
|
require 'vagrant-lxc/action/is_running'
|
@@ -123,6 +124,7 @@ module Vagrant
|
|
123
124
|
# b.use CheckLXC
|
124
125
|
b.use Vagrant::Action::Builtin::Call, Created do |env, b2|
|
125
126
|
if env[:result]
|
127
|
+
b2.use Disconnect
|
126
128
|
b2.use Vagrant::Action::Builtin::Call, Vagrant::Action::Builtin::GracefulHalt, :stopped, :running do |env2, b3|
|
127
129
|
if !env2[:result] && env2[:machine].provider.state.running?
|
128
130
|
b3.use ForcedHalt
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Vagrant
|
2
|
+
module LXC
|
3
|
+
module Action
|
4
|
+
class Disconnect < BaseAction
|
5
|
+
def call(env)
|
6
|
+
@app.call env
|
7
|
+
# FIXME: Vagrant >= 1.1.3 should not need this
|
8
|
+
# https://github.com/mitchellh/vagrant/compare/715539eac30bc9ae62ddbb6337d13f036f7b774d...ec1bae0#L2R128
|
9
|
+
env[:machine].instance_variable_set(:@communicator, nil)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
# FIXME: Ruby 1.8 users dont have SecureRandom
|
2
1
|
require 'securerandom'
|
3
2
|
|
4
3
|
require "vagrant-lxc/errors"
|
@@ -104,67 +103,22 @@ module Vagrant
|
|
104
103
|
end
|
105
104
|
|
106
105
|
def assigned_ip
|
107
|
-
unless File.read(base_path.join('config')) =~ /^lxc\.network\.hwaddr\s*=\s*([a-z0-9:]+)\s*$/
|
108
|
-
raise 'Unknown Container MAC Address'
|
109
|
-
end
|
110
|
-
mac_addr = $1
|
111
|
-
|
112
106
|
ip = ''
|
113
107
|
retryable(:on => LXC::Errors::ExecuteError, :tries => 10, :sleep => 3) do
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
ping_subnet!
|
108
|
+
unless ip = get_container_ip_from_ifconfig
|
109
|
+
# retry
|
110
|
+
raise LXC::Errors::ExecuteError, :command => ['arp', '-n'].inspect
|
118
111
|
end
|
119
112
|
end
|
120
113
|
ip
|
121
114
|
end
|
122
115
|
|
123
|
-
def
|
124
|
-
|
125
|
-
|
126
|
-
# If the command was a failure then raise an exception that is nicely
|
127
|
-
# handled by Vagrant.
|
128
|
-
if r.exit_code != 0
|
129
|
-
if @interrupted
|
130
|
-
@logger.info("Exit code != 0, but interrupted. Ignoring.")
|
131
|
-
else
|
132
|
-
raise LXC::Errors::ExecuteError, :command => ['arp', '-n'].inspect
|
133
|
-
end
|
134
|
-
end
|
135
|
-
|
136
|
-
if r.stdout.gsub("\r\n", "\n").strip =~ /^([0-9.]+).+#{Regexp.escape mac_addr}/
|
116
|
+
def get_container_ip_from_ifconfig
|
117
|
+
output = @cli.attach '/sbin/ifconfig', '-v', 'eth0', namespaces: 'network'
|
118
|
+
if output =~ /\s+inet addr:([0-9.]+)\s+/
|
137
119
|
return $1.to_s
|
138
120
|
end
|
139
121
|
end
|
140
|
-
|
141
|
-
# FIXME: Should output an error friendly message in case fping is not installed
|
142
|
-
def ping_subnet!
|
143
|
-
raise LXC::Errors::UnknownLxcConfigFile unless File.exists?(LXC_DEFAULTS_PATH)
|
144
|
-
|
145
|
-
raise LXC::Errors::UnknownLxcBridgeAddress unless
|
146
|
-
File.read(LXC_DEFAULTS_PATH) =~ /^LXC_ADDR\="?([0-9.]+)"?.*$/
|
147
|
-
|
148
|
-
cmd = ['fping', '-c', '1', '-g', '-q', "#{$1}/24"]
|
149
|
-
raw(*cmd)
|
150
|
-
|
151
|
-
raise LXC::Errors::ExecuteError, :command => cmd.inspect
|
152
|
-
end
|
153
|
-
|
154
|
-
# TODO: Review code below this line, it was pretty much a copy and paste from VirtualBox base driver
|
155
|
-
def raw(*command, &block)
|
156
|
-
int_callback = lambda do
|
157
|
-
@interrupted = true
|
158
|
-
@logger.info("Interrupted.")
|
159
|
-
end
|
160
|
-
|
161
|
-
# Append in the options for subprocess
|
162
|
-
command << { :notify => [:stdout, :stderr] }
|
163
|
-
|
164
|
-
Vagrant::Util::Busy.busy(int_callback) do
|
165
|
-
Vagrant::Util::Subprocess.execute(*command, &block)
|
166
|
-
end
|
167
|
-
end
|
168
122
|
end
|
169
123
|
end
|
170
124
|
end
|
@@ -56,6 +56,18 @@ module Vagrant
|
|
56
56
|
run :shutdown, '--name', @name
|
57
57
|
end
|
58
58
|
|
59
|
+
def attach(*cmd)
|
60
|
+
cmd = ['--'] + cmd
|
61
|
+
|
62
|
+
if cmd.last.is_a?(Hash)
|
63
|
+
opts = cmd.pop
|
64
|
+
namespaces = Array(opts[:namespaces]).map(&:upcase).join('|')
|
65
|
+
extra = ['--namespaces', namespaces] if namespaces
|
66
|
+
end
|
67
|
+
|
68
|
+
run :attach, '--name', @name, *((extra || []) + cmd)
|
69
|
+
end
|
70
|
+
|
59
71
|
def transition_to(state, &block)
|
60
72
|
raise TransitionBlockNotProvided unless block_given?
|
61
73
|
|
data/lib/vagrant-lxc/version.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
eth0 Link encap:Ethernet HWaddr 00:16:3e:7c:dd:44
|
2
|
+
inet addr:10.0.3.109 Bcast:10.0.3.255 Mask:255.255.255.0
|
3
|
+
inet6 addr: fe80::216:3eff:fe7c:dd44/64 Scope:Link
|
4
|
+
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
|
5
|
+
RX packets:204 errors:0 dropped:0 overruns:0 frame:0
|
6
|
+
TX packets:203 errors:0 dropped:0 overruns:0 carrier:0
|
7
|
+
collisions:0 txqueuelen:1000
|
8
|
+
RX bytes:29663 (29.6 KB) TX bytes:30168 (30.1 KB)
|
9
|
+
|
10
|
+
lo Link encap:Local Loopback
|
11
|
+
inet addr:127.0.0.1 Mask:255.0.0.0
|
12
|
+
inet6 addr: ::1/128 Scope:Host
|
13
|
+
UP LOOPBACK RUNNING MTU:16436 Metric:1
|
14
|
+
RX packets:73 errors:0 dropped:0 overruns:0 frame:0
|
15
|
+
TX packets:73 errors:0 dropped:0 overruns:0 carrier:0
|
16
|
+
collisions:0 txqueuelen:0
|
17
|
+
RX bytes:34173 (34.1 KB) TX bytes:34173 (34.1 KB)
|
18
|
+
|
data/spec/spec_helper.rb
CHANGED
@@ -2,13 +2,11 @@ if ENV['COVERAGE']
|
|
2
2
|
require 'simplecov'
|
3
3
|
SimpleCov.start do
|
4
4
|
# This can probably go away once we stop using vagrant as submodule
|
5
|
-
add_filter { |source_file| source_file.filename =~ /\/vagrant\/plugins\// }
|
6
|
-
add_filter { |source_file| source_file.filename =~ /\/vagrant\/lib\/vagrant(\/|\.rb)/ }
|
7
5
|
add_filter { |source_file| source_file.filename =~ /\/spec\/support/ }
|
8
6
|
end
|
9
7
|
end
|
10
8
|
|
11
|
-
require 'bundler'
|
9
|
+
require 'bundler/setup'
|
12
10
|
|
13
11
|
require 'rspec-spies'
|
14
12
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'unit_helper'
|
2
2
|
|
3
|
-
require
|
3
|
+
require 'vagrant'
|
4
4
|
require 'vagrant-lxc/container/cli'
|
5
5
|
|
6
6
|
describe Vagrant::LXC::Container::CLI do
|
@@ -122,6 +122,27 @@ describe Vagrant::LXC::Container::CLI do
|
|
122
122
|
end
|
123
123
|
end
|
124
124
|
|
125
|
+
describe 'attach' do
|
126
|
+
let(:name) { 'a-running-container' }
|
127
|
+
let(:command) { ['ls', 'cat /tmp/file'] }
|
128
|
+
let(:command_output) { 'folders list' }
|
129
|
+
subject { described_class.new(name) }
|
130
|
+
|
131
|
+
before do
|
132
|
+
subject.stub(run: command_output)
|
133
|
+
end
|
134
|
+
|
135
|
+
it 'calls lxc-attach with specified command' do
|
136
|
+
subject.attach(*command)
|
137
|
+
subject.should have_received(:run).with(:attach, '--name', name, '--', *command)
|
138
|
+
end
|
139
|
+
|
140
|
+
it 'supports a "namespaces" parameter' do
|
141
|
+
subject.attach *(command + [{namespaces: ['network', 'mount']}])
|
142
|
+
subject.should have_received(:run).with(:attach, '--name', name, '--namespaces', 'NETWORK|MOUNT', '--', *command)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
125
146
|
describe 'transition block' do
|
126
147
|
let(:name) { 'a-running-container' }
|
127
148
|
subject { described_class.new(name) }
|
data/spec/unit/container_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'unit_helper'
|
2
2
|
|
3
|
-
require
|
3
|
+
require 'vagrant'
|
4
4
|
require 'vagrant-lxc/container'
|
5
5
|
|
6
6
|
describe Vagrant::LXC::Container do
|
@@ -125,27 +125,19 @@ describe Vagrant::LXC::Container do
|
|
125
125
|
end
|
126
126
|
|
127
127
|
describe 'assigned ip' do
|
128
|
-
# This ip is set on the sample-
|
129
|
-
|
130
|
-
let(:
|
131
|
-
let(:
|
132
|
-
let(:
|
133
|
-
|
134
|
-
context 'when container mac address gets returned from the first `arp` call' do
|
135
|
-
before do
|
136
|
-
@arp_output = File.read('spec/fixtures/sample-arp-output')
|
137
|
-
subject.stub(:raw) {
|
138
|
-
mock(stdout: "#{@arp_output}\n", exit_code: 0)
|
139
|
-
}
|
140
|
-
File.stub(read: conf_file_contents)
|
141
|
-
end
|
128
|
+
# This ip is set on the sample-ifconfig-output fixture
|
129
|
+
let(:ip) { "10.0.3.109" }
|
130
|
+
let(:ifconfig_output) { File.read('spec/fixtures/sample-ifconfig-output') }
|
131
|
+
let(:name) { 'random-container-name' }
|
132
|
+
let(:cli) { fire_double('Vagrant::LXC::Container::CLI', :attach => ifconfig_output) }
|
142
133
|
|
143
|
-
|
134
|
+
subject { described_class.new(name, cli) }
|
135
|
+
|
136
|
+
context 'when ip for eth0 gets returned from lxc-attach call' do
|
137
|
+
it 'gets parsed from ifconfig output' do
|
144
138
|
subject.assigned_ip.should == ip
|
145
|
-
|
139
|
+
cli.should have_received(:attach).with('/sbin/ifconfig', '-v', 'eth0', namespaces: 'network')
|
146
140
|
end
|
147
141
|
end
|
148
|
-
|
149
|
-
pending 'when mac address is not returned from an `arp` call'
|
150
142
|
end
|
151
143
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-lxc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Rehm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-03-
|
11
|
+
date: 2013-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Linux Containers provider for Vagrant
|
14
14
|
email:
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- lib/vagrant-lxc/action/create.rb
|
49
49
|
- lib/vagrant-lxc/action/created.rb
|
50
50
|
- lib/vagrant-lxc/action/destroy.rb
|
51
|
+
- lib/vagrant-lxc/action/disconnect.rb
|
51
52
|
- lib/vagrant-lxc/action/forced_halt.rb
|
52
53
|
- lib/vagrant-lxc/action/handle_box_metadata.rb
|
53
54
|
- lib/vagrant-lxc/action/is_running.rb
|
@@ -62,8 +63,7 @@ files:
|
|
62
63
|
- lib/vagrant-lxc/provider.rb
|
63
64
|
- lib/vagrant-lxc/version.rb
|
64
65
|
- locales/en.yml
|
65
|
-
- spec/fixtures/sample-
|
66
|
-
- spec/fixtures/sample-config
|
66
|
+
- spec/fixtures/sample-ifconfig-output
|
67
67
|
- spec/spec_helper.rb
|
68
68
|
- spec/support/unit_example_group.rb
|
69
69
|
- spec/unit/action/handle_box_metadata_spec.rb
|
@@ -83,23 +83,22 @@ require_paths:
|
|
83
83
|
- lib
|
84
84
|
required_ruby_version: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- -
|
86
|
+
- - '>='
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
90
|
requirements:
|
91
|
-
- -
|
91
|
+
- - '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
requirements: []
|
95
95
|
rubyforge_project:
|
96
|
-
rubygems_version: 2.0.
|
96
|
+
rubygems_version: 2.0.0
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: Linux Containers provider for Vagrant
|
100
100
|
test_files:
|
101
|
-
- spec/fixtures/sample-
|
102
|
-
- spec/fixtures/sample-config
|
101
|
+
- spec/fixtures/sample-ifconfig-output
|
103
102
|
- spec/spec_helper.rb
|
104
103
|
- spec/support/unit_example_group.rb
|
105
104
|
- spec/unit/action/handle_box_metadata_spec.rb
|
data/spec/fixtures/sample-config
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
lxc.network.type=veth
|
2
|
-
lxc.network.link=lxcbr0
|
3
|
-
lxc.network.flags=up
|
4
|
-
lxc.network.hwaddr = 00:16:3e:64:d6:74
|
5
|
-
lxc.rootfs = /var/lib/lxc/a91df47bfc6e/rootfs
|
6
|
-
lxc.utsname = a91df47bfc6e
|
7
|
-
|
8
|
-
lxc.devttydir = lxc
|
9
|
-
lxc.tty = 4
|
10
|
-
lxc.pts = 1024
|
11
|
-
lxc.mount = /var/lib/lxc/a91df47bfc6e/fstab
|
12
|
-
lxc.arch = amd64
|
13
|
-
lxc.cap.drop = sys_module mac_admin mac_override
|
14
|
-
lxc.pivotdir = lxc_putold
|
15
|
-
|
16
|
-
# uncomment the next line to run the container unconfined:
|
17
|
-
#lxc.aa_profile = unconfined
|
18
|
-
|
19
|
-
lxc.cgroup.devices.deny = a
|
20
|
-
# Allow any mknod (but not using the node)
|
21
|
-
lxc.cgroup.devices.allow = c *:* m
|
22
|
-
lxc.cgroup.devices.allow = b *:* m
|
23
|
-
# /dev/null and zero
|
24
|
-
lxc.cgroup.devices.allow = c 1:3 rwm
|
25
|
-
lxc.cgroup.devices.allow = c 1:5 rwm
|
26
|
-
# consoles
|
27
|
-
lxc.cgroup.devices.allow = c 5:1 rwm
|
28
|
-
lxc.cgroup.devices.allow = c 5:0 rwm
|
29
|
-
#lxc.cgroup.devices.allow = c 4:0 rwm
|
30
|
-
#lxc.cgroup.devices.allow = c 4:1 rwm
|
31
|
-
# /dev/{,u}random
|
32
|
-
lxc.cgroup.devices.allow = c 1:9 rwm
|
33
|
-
lxc.cgroup.devices.allow = c 1:8 rwm
|
34
|
-
lxc.cgroup.devices.allow = c 136:* rwm
|
35
|
-
lxc.cgroup.devices.allow = c 5:2 rwm
|
36
|
-
# rtc
|
37
|
-
lxc.cgroup.devices.allow = c 254:0 rwm
|
38
|
-
#fuse
|
39
|
-
lxc.cgroup.devices.allow = c 10:229 rwm
|
40
|
-
#tun
|
41
|
-
lxc.cgroup.devices.allow = c 10:200 rwm
|
42
|
-
#full
|
43
|
-
lxc.cgroup.devices.allow = c 1:7 rwm
|
44
|
-
#hpet
|
45
|
-
lxc.cgroup.devices.allow = c 10:228 rwm
|
46
|
-
#kvm
|
47
|
-
lxc.cgroup.devices.allow = c 10:232 rwm
|