staypuft 0.5.19 → 0.5.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/staypuft/deployments_helper.rb +8 -0
- data/app/lib/staypuft/seeder.rb +3 -7
- data/app/models/staypuft/concerns/host_interface_management.rb +10 -0
- data/app/models/staypuft/concerns/nic_bonding_extensions.rb +17 -0
- data/app/models/staypuft/deployment/neutron_service.rb +5 -1
- data/app/views/staypuft/deployments/_hosts_table.html.erb +10 -2
- data/lib/staypuft/engine.rb +1 -0
- data/lib/staypuft/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07df5121c287c8805d1258989d69df3bdfc5998a
|
4
|
+
data.tar.gz: 76ea84cf1ba8468f2e6b44369e362410e725e550
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b579d2517979c055f44f0cf226208c5d57a00c578bc3abfcffd3b502c4c8c8620f3ef7829cd40e3d83d0819b101341b0c1f1f7343cba9794903138adc9de587d
|
7
|
+
data.tar.gz: da35efa013daf0b6b644aa265130b06ea634c47d6e65b3cc1278dab8efc3b731417edc74b43bf8a115b9ccf77c182a41687027d995f5635145303241507de9e1
|
@@ -52,6 +52,14 @@ module Staypuft
|
|
52
52
|
host.interfaces_identifiers.compact.sort.join(tag(:br)).html_safe
|
53
53
|
end
|
54
54
|
|
55
|
+
def host_nics_with_subnets(host)
|
56
|
+
nics_list = ""
|
57
|
+
host.interfaces_identifiers_with_subnets.each do |nic_plus_subnet|
|
58
|
+
nics_list += nic_plus_subnet[0] + " (#{nic_plus_subnet[1]})" + tag(:br)
|
59
|
+
end
|
60
|
+
nics_list.html_safe
|
61
|
+
end
|
62
|
+
|
55
63
|
def host_disks(host)
|
56
64
|
hosts_facts = FactValue.joins(:fact_name).where(host_id: host.id)
|
57
65
|
host.blockdevices.collect do |blockdevice|
|
data/app/lib/staypuft/seeder.rb
CHANGED
@@ -277,7 +277,7 @@ module Staypuft
|
|
277
277
|
'network_auto_schedule' => 'default' }
|
278
278
|
}
|
279
279
|
neutron_network_device_mtu = { :string => '<%= @host.deployment.neutron.compute_network_device_mtu %>' }
|
280
|
-
|
280
|
+
l3_ha = { :string => "<%= @host.deployment.neutron.l3_ha.to_s %>" }
|
281
281
|
# Glance
|
282
282
|
glance = { :string => '<%= @host.deployment.glance.ceph_backend? ? "false" : "true" %>'}
|
283
283
|
backend = { :string => '<%= @host.deployment.glance.backend %>' }
|
@@ -340,16 +340,11 @@ module Staypuft
|
|
340
340
|
|
341
341
|
# Ceph
|
342
342
|
ceph_cluster_network = { :string => "<%= @host.network_query.network_address_for_host('#{Staypuft::SubnetType::STORAGE_CLUSTERING}') %>" }
|
343
|
-
|
344
|
-
# on the storage network
|
345
|
-
ceph_public_network = { :string => "<%= @host.network_query.network_address_for_host('#{Staypuft::SubnetType::PXE}') %>" }
|
343
|
+
ceph_public_network = { :string => "<%= @host.network_query.network_address_for_host('#{Staypuft::SubnetType::STORAGE}') %>" }
|
346
344
|
ceph_fsid = { :string => '<%= @host.deployment.ceph.fsid %>' }
|
347
345
|
ceph_images_key = { :string => '<%= @host.deployment.ceph.images_key %>' }
|
348
346
|
ceph_volumes_key = { :string => '<%= @host.deployment.ceph.volumes_key %>' }
|
349
|
-
# FIXME: this should move to STORAGE from PXE like above
|
350
347
|
ceph_mon_host = { :array => "<%= @host.network_query.controller_ips('#{Staypuft::SubnetType::STORAGE}') %>" }
|
351
|
-
# FIXME: This is currently the hostnames (which maps to fqdns on the PXE network) -- eventually we want DNS names
|
352
|
-
# on the Storage network
|
353
348
|
ceph_mon_initial_members = { :array => "<%= @host.deployment.ceph.mon_initial_members %>" }
|
354
349
|
ceph_osd_pool_size = { :string => '<%= @host.deployment.ceph.osd_pool_size %>' }
|
355
350
|
ceph_osd_journal_size = { :string => '<%= @host.deployment.ceph.osd_journal_size %>' }
|
@@ -530,6 +525,7 @@ module Staypuft
|
|
530
525
|
'security_group_api' => neutron_security_group_api,
|
531
526
|
'network_device_mtu' => neutron_network_device_mtu,
|
532
527
|
'veth_mtu' => neutron_network_device_mtu,
|
528
|
+
'l3_ha' => l3_ha,
|
533
529
|
},
|
534
530
|
'quickstack::pacemaker::glance' => {
|
535
531
|
'backend' => backend,
|
@@ -17,6 +17,16 @@ module Staypuft
|
|
17
17
|
interfaces
|
18
18
|
end
|
19
19
|
|
20
|
+
def interfaces_identifiers_with_subnets
|
21
|
+
interfaces = [ [self.primary_interface, self.subnet.name] ]
|
22
|
+
if self.respond_to?(:interfaces)
|
23
|
+
interfaces += self.interfaces.where("type <> 'Nic::BMC'").physical.map do |interface|
|
24
|
+
[interface.identifier, ((sub = interface.subnet) ? sub.name : "")]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
interfaces
|
28
|
+
end
|
29
|
+
|
20
30
|
def make_all_interfaces_managed
|
21
31
|
self.interfaces.each do |interface|
|
22
32
|
interface.managed = true
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Staypuft
|
2
|
+
module Concerns
|
3
|
+
module NicBondingExtensions
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
|
6
|
+
included do
|
7
|
+
before_save :ensure_mac
|
8
|
+
end
|
9
|
+
|
10
|
+
def ensure_mac
|
11
|
+
mac_addresses = self.host.interfaces.where(
|
12
|
+
:identifier => attached_devices_identifiers).pluck(:mac).compact
|
13
|
+
self.mac = mac_addresses.first unless mac_addresses.include?(self.mac)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -103,7 +103,7 @@ module Staypuft
|
|
103
103
|
:openvswitch_mechanism?, :l2population_mechanism?, :cisco_nexus_mechanism?,
|
104
104
|
:ml2_mechanisms, :nexuses, :active?, :compute_cisco_nexus_config, :core_plugin,
|
105
105
|
:ml2_plugin?, :n1kv_plugin?, :n1kv_vsm_ip, :n1kv_vsm_password,
|
106
|
-
:core_plugin_module, :network_device_mtu, :compute_network_device_mtu
|
106
|
+
:core_plugin_module, :network_device_mtu, :compute_network_device_mtu, :l3_ha
|
107
107
|
end
|
108
108
|
|
109
109
|
def set_defaults
|
@@ -208,6 +208,10 @@ module Staypuft
|
|
208
208
|
Ml2Mechanisms::TYPES.map { |ml2_type| ml2_type if self.send("#{ml2_type}_mechanism?") }.compact
|
209
209
|
end
|
210
210
|
|
211
|
+
def l3_ha
|
212
|
+
deployment.network_query.controllers.size > 1
|
213
|
+
end
|
214
|
+
|
211
215
|
def param_hash
|
212
216
|
{ 'network_segmentation' => network_segmentation,
|
213
217
|
'core_plugin' => core_plugin,
|
@@ -14,7 +14,11 @@
|
|
14
14
|
<th><%= _("CPUs") %><br/><span class="text-muted small"><%= _("(cores)") %></span></th>
|
15
15
|
<th><%= _("Memory") %><br/><span class="text-muted small"><%= _("(GB)") %></span></th>
|
16
16
|
<th><%= _("Storage") %></th>
|
17
|
-
|
17
|
+
<% if local_assigns[:deployment_role_col] %>
|
18
|
+
<th><%= _("NICs (Subnet)") %></th>
|
19
|
+
<% else %>
|
20
|
+
<th><%= _("NICs") %></th>
|
21
|
+
<% end %>
|
18
22
|
<th class="hidden-s hidden-xs"><%= sort :ip, :as => _('IP Address') %></th>
|
19
23
|
</tr>
|
20
24
|
</thead>
|
@@ -43,7 +47,11 @@
|
|
43
47
|
<td><%= host.cpus if host.respond_to?(:cpus) %></td>
|
44
48
|
<td><%= host.mem if host.respond_to?(:mem) %></td>
|
45
49
|
<td><%= host_disks(host) %></td>
|
46
|
-
|
50
|
+
<% if local_assigns[:deployment_role_col] %>
|
51
|
+
<td><%= host_nics_with_subnets(host) %></td>
|
52
|
+
<% else %>
|
53
|
+
<td><%= host_nics(host) %></td>
|
54
|
+
<% end %>
|
47
55
|
<td class="hidden-s hidden-xs"><%= host.ip %></td>
|
48
56
|
</tr>
|
49
57
|
<% end %>
|
data/lib/staypuft/engine.rb
CHANGED
@@ -43,6 +43,7 @@ module Staypuft
|
|
43
43
|
::Api::V1::HostsController.send :include, Staypuft::Concerns::HostsApiExtensions
|
44
44
|
::Api::V2::HostsController.send :include, Staypuft::Concerns::HostsApiExtensions
|
45
45
|
::HostsController.send :include, Staypuft::Concerns::HostsControllerExtensions
|
46
|
+
::Nic::Bond.send :include, Staypuft::Concerns::NicBondingExtensions
|
46
47
|
|
47
48
|
# preload all the Foreman's lib files but only in production
|
48
49
|
if Rails.env.production?
|
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.5.
|
4
|
+
version: 0.5.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Staypuft team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman-tasks
|
@@ -151,6 +151,7 @@ files:
|
|
151
151
|
- app/models/staypuft/concerns/host_orchestration_build_hook.rb
|
152
152
|
- app/models/staypuft/concerns/host_fencing_extensions.rb
|
153
153
|
- app/models/staypuft/concerns/lookup_key_extensions.rb
|
154
|
+
- app/models/staypuft/concerns/nic_bonding_extensions.rb
|
154
155
|
- app/models/staypuft/concerns/host_open_stack_affiliation.rb
|
155
156
|
- app/models/staypuft/role_service.rb
|
156
157
|
- app/models/staypuft/service.rb
|