Disable heat for RHOS, backport swift ring builder for RHOS 3.0

Heat manifests still lack qpid support, so it needs
to be disabled during deployment.
Swift ring builder output changed for Havana, but a backport
is needed for RHOS 3.0.
Changes marked as FIXME

Change-Id: I75ec9c861119f975fa37cac875c5203272443ed8
Closes-Bug: #1263359
Related-Bug: #1263331
This commit is contained in:
Matthew Mosesohn 2013-12-21 21:42:07 +04:00
parent a898b49da1
commit 2b61ec0e42
3 changed files with 53 additions and 28 deletions

View File

@ -341,7 +341,7 @@ class osnailyfacter::cluster_ha {
if $primary_proxy {
ring_devices {'all': storages => $controllers }
}
if !$swift_hash['resize_value']
{
$swift_hash['resize_value'] = 2
@ -408,24 +408,26 @@ class osnailyfacter::cluster_ha {
use_floating_ips => $::fuel_settings['auto_assign_floating_ip'],
}
}
class { 'heat' :
pacemaker => true,
external_ip => $controller_node_public,
#FIXME: Disable heat for Red Hat OpenStack 3.0
if ($::operatingsystem != 'RedHat') {
class { 'heat' :
pacemaker => true,
external_ip => $controller_node_public,
heat_keystone_host => $controller_node_address,
heat_keystone_user => 'heat',
heat_keystone_password => 'heat',
heat_keystone_tenant => 'services',
heat_keystone_host => $controller_node_address,
heat_keystone_user => 'heat',
heat_keystone_password => 'heat',
heat_keystone_tenant => 'services',
heat_rabbit_host => $controller_node_address,
heat_rabbit_login => $rabbit_hash['user'],
heat_rabbit_password => $rabbit_hash['password'],
heat_rabbit_port => '5672',
heat_db_host => $controller_node_address,
heat_db_password => $heat_hash['db_password'],
}
heat_rabbit_host => $controller_node_address,
heat_rabbit_login => $rabbit_hash['user'],
heat_rabbit_password => $rabbit_hash['password'],
heat_rabbit_port => '5672',
heat_db_host => $controller_node_address,
heat_db_password => $heat_hash['db_password'],
}
}
if $murano_hash['enabled'] {

View File

@ -277,6 +277,8 @@ class osnailyfacter::cluster_simple {
use_floating_ips => $::fuel_settings['auto_assign_floating_ip'],
}
}
#FIXME: Disable heat for Red Hat OpenStack 3.0
if ($::operatingsystem != 'RedHat') {
class { 'heat' :
pacemaker => false,
external_ip => $controller_node_public,
@ -294,7 +296,7 @@ class osnailyfacter::cluster_simple {
heat_db_host => $controller_node_address,
heat_db_password => $heat_hash['db_password'],
}
}
if $murano_hash['enabled'] {
class { 'murano' :

View File

@ -14,17 +14,33 @@ class Puppet::Provider::SwiftRingBuilder < Puppet::Provider
if File.exists?(builder_file_path)
if rows = swift_ring_builder(builder_file_path).split("\n")[4..-1]
rows.each do |row|
if row =~ /^\s+(\d+)\s+(\d+)\s+(\d+)\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+\.\d+)\s+(\d+)?\s+\d?(-?\d+\.\d+)\s*(\S*)$/
object_hash["#{$4}:#{$5}"] = {
:id => $1,
:region => $2,
:zone => $3,
:partitions => $10,
:balance => $11,
:meta => $12,
}
#FIXME: Workaround for Red Hat still running Grizzly
if Facter.value(:operatingsystem) == 'RedHat'
if row =~ /^\s+(\d+)\s+(\d+)\s+(\d+)\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+\.\d+)\s+(\d+)?\s+\d?(-?\d+\.\d+)\s+(\S*)$/
object_hash["#{$4}:#{$5}"] = {
:id => $1,
:region => $2,
:zone => $3,
:partitions => $8,
:balance => $9,
:meta => $10,
}
else
Puppet.warning("Unexpected line: #{row}")
end
else
Puppet.warning("Unexpected line: #{row}")
if row =~ /^\s+(\d+)\s+(\d+)\s+(\d+)\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+\.\d+)\s+(\d+)?\s+\d?(-?\d+\.\d+)\s*(\S*)$/
object_hash["#{$4}:#{$5}"] = {
:id => $1,
:region => $2,
:zone => $3,
:partitions => $10,
:balance => $11,
:meta => $12,
}
else
Puppet.warning("Unexpected line: #{row}")
end
end
end
end
@ -90,7 +106,12 @@ class Puppet::Provider::SwiftRingBuilder < Puppet::Provider
def used_devs
if devs = swift_ring_builder(builder_file_path).split("\n")[4..-1]
@used_devices = devs.collect do |line|
line.strip.split(/\s+/)[7] if line.match(/#{resource[:name].split(':')[0]}/)
#Workaround for Red Hat still running Grizzly
if Facter.value(:operatingsystem) == 'RedHat'
line.strip.split(/\s+/)[5] if line.match(/#{resource[:name].split(':')[0]}/)
else
line.strip.split(/\s+/)[7] if line.match(/#{resource[:name].split(':')[0]}/)
end
end.compact.sort
else
[]