staypuft 0.2.2 → 0.2.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 649e6b74832134eb32e65dc093a3ee06a95f6f35
|
|
4
|
+
data.tar.gz: 2820cd2146364cba2011cb93183aa9043acef7d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 277934325a63af0c682e8fc7c126e2e170b4582516eaa8f3cb2518498cedd39b23ef45e66beb52cecc1c0ea8e0b07cffdd1d6fd51fcff93c40821cf82fef7690
|
|
7
|
+
data.tar.gz: e18505d768ab7a0a876af874be7e3ff04fbea846cd95d21d0ff21475441b86022326b133660b140b59b6e80b55ebc2374e9220cdb9f00536d21cd69a0a323b45
|
data/app/lib/staypuft/seeder.rb
CHANGED
|
@@ -342,7 +342,6 @@ module Staypuft
|
|
|
342
342
|
'swift_shared_secret' => swift_shared_secret,
|
|
343
343
|
'swift_ringserver_ip' => '',
|
|
344
344
|
'swift_storage_ips' => { :array => '<%= @host.deployment.ips.controller_ips %>' },
|
|
345
|
-
'cinder_nfs_shares' => [],
|
|
346
345
|
'cinder_gluster_shares' => [],
|
|
347
346
|
'controller_admin_host' => controller_host,
|
|
348
347
|
'controller_priv_host' => controller_host,
|
|
@@ -416,7 +415,6 @@ module Staypuft
|
|
|
416
415
|
'swift_shared_secret' => swift_shared_secret,
|
|
417
416
|
'swift_ringserver_ip' => '',
|
|
418
417
|
'swift_storage_ips' => { :array => '<%= @host.deployment.ips.controller_ips %>' },
|
|
419
|
-
'cinder_nfs_shares' => [],
|
|
420
418
|
'cinder_gluster_shares' => [],
|
|
421
419
|
'controller_admin_host' => controller_host,
|
|
422
420
|
'controller_priv_host' => controller_host,
|
|
@@ -5,8 +5,20 @@ module Staypuft
|
|
|
5
5
|
|
|
6
6
|
# Returns memory in GB
|
|
7
7
|
def mem
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
mem_arr = self.facts_hash["memorytotal"]
|
|
9
|
+
if mem_arr
|
|
10
|
+
mem_str, mem_unit = mem_arr.split(" ")
|
|
11
|
+
mem_number = mem_str.to_f
|
|
12
|
+
case mem_unit
|
|
13
|
+
when "MB"
|
|
14
|
+
mem_number / 1024
|
|
15
|
+
when "GB"
|
|
16
|
+
mem_number
|
|
17
|
+
when "TB"
|
|
18
|
+
mem_number * 1024
|
|
19
|
+
else
|
|
20
|
+
nil
|
|
21
|
+
end
|
|
10
22
|
else
|
|
11
23
|
nil
|
|
12
24
|
end
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
require 'resolv'
|
|
2
|
-
|
|
3
1
|
module Staypuft
|
|
4
2
|
class Deployment::IPS < Deployment::AbstractParamScope
|
|
5
3
|
|
|
@@ -12,9 +10,7 @@ module Staypuft
|
|
|
12
10
|
end
|
|
13
11
|
|
|
14
12
|
def controller_ips
|
|
15
|
-
controllers.map
|
|
16
|
-
ip_for_controller(controller)
|
|
17
|
-
end
|
|
13
|
+
controllers.map &:ip
|
|
18
14
|
end
|
|
19
15
|
|
|
20
16
|
def controller_fqdns
|
|
@@ -22,15 +18,8 @@ module Staypuft
|
|
|
22
18
|
end
|
|
23
19
|
|
|
24
20
|
def controller_ip
|
|
25
|
-
|
|
21
|
+
controllers.tap { |v| v.size == 1 or raise }.first.ip
|
|
26
22
|
end
|
|
27
23
|
|
|
28
|
-
# TODO: a better fix is needed once we have explicit subnet support in staypuft
|
|
29
|
-
# This is needed because host.ip doesn't always return the expected ip address
|
|
30
|
-
# when the host has more than one network interface -- this ensures that the
|
|
31
|
-
# provisioning network interface is the chosen one.
|
|
32
|
-
def ip_for_controller(controller)
|
|
33
|
-
Resolv::DNS.new(:nameserver => 'localhost').getaddress(controller.fqdn).to_s
|
|
34
|
-
end
|
|
35
24
|
end
|
|
36
25
|
end
|
data/lib/staypuft/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: staypuft
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Staypuft team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-08-
|
|
11
|
+
date: 2014-08-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: foreman-tasks
|