linecook-gem 0.4.6 → 0.4.7
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/lib/linecook/builder/lxc.rb +4 -2
- data/lib/linecook/builder/manager.rb +21 -0
- data/lib/linecook/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a93ecc167e2a22ba2fbe82b6158211cf9103f22
|
4
|
+
data.tar.gz: 73cbf644f495b907e5adf96b4a30cbc959097942
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba75ddca8e282a97ac9e6159da754772e1e036705b871ed7555628e8e985559b4ee1fc945b2ee5aefec9df480515f8c560f8f47ae63635c3c9304642a03c57a8
|
7
|
+
data.tar.gz: 95dc027d3148fb8c4900e87adc6ab09ba88d188afd7baa021678265822e2e8c3521bfd42e4ac2075bc4ac3c739191f22acf320c8e8561bafba324e6c9bfb8421
|
data/lib/linecook/builder/lxc.rb
CHANGED
@@ -124,8 +124,10 @@ module Linecook
|
|
124
124
|
|
125
125
|
def write_config
|
126
126
|
path = if @remote
|
127
|
-
|
128
|
-
|
127
|
+
file = Tempfile.new('lxc-config')
|
128
|
+
file.close
|
129
|
+
@remote.upload(@config, file.path)
|
130
|
+
file.path
|
129
131
|
else
|
130
132
|
file = Tempfile.new('lxc-config')
|
131
133
|
file.write(@config)
|
@@ -52,5 +52,26 @@ module Linecook
|
|
52
52
|
fail "Cannot find supported backend for #{Config.platform}"
|
53
53
|
end
|
54
54
|
end
|
55
|
+
|
56
|
+
def increase_loop_devices
|
57
|
+
kparams = {}
|
58
|
+
File.read('/proc/cmdline').split(/\s+/).each do |param|
|
59
|
+
k,v = param.split('=')
|
60
|
+
kparams[k] = v
|
61
|
+
end
|
62
|
+
|
63
|
+
if loops = kparams['max_loop']
|
64
|
+
current = ssh.capture('ls -1 /dev | grep loop')
|
65
|
+
last_loop = current.lines.length
|
66
|
+
to_create = loops.to_i - last_loop
|
67
|
+
|
68
|
+
to_create.times do |count|
|
69
|
+
index = last_loop + count
|
70
|
+
ssh.run("mknod -m660 /dev/loop#{index} b 7 #{index}")
|
71
|
+
ssh.run("chown root:disk /dev/loop#{index}")
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
55
76
|
end
|
56
77
|
end
|
data/lib/linecook/version.rb
CHANGED