aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifests/haproxy.pp108
-rw-r--r--manifests/profile/base/ceph.pp34
-rw-r--r--manifests/profile/base/cinder/volume/iscsi.pp5
-rw-r--r--manifests/profile/base/haproxy.pp14
-rw-r--r--manifests/profile/pacemaker/database/mysql.pp11
5 files changed, 98 insertions, 74 deletions
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index b2cc264..a79bf14 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -111,99 +111,99 @@
#
# [*keystone_admin*]
# (optional) Enable or not Keystone Admin API binding
-# Defaults to false
+# Defaults to hiera('keystone_enabled', false)
#
# [*keystone_public*]
# (optional) Enable or not Keystone Public API binding
-# Defaults to false
+# Defaults to hiera('keystone_enabled', false)
#
# [*neutron*]
# (optional) Enable or not Neutron API binding
-# Defaults to false
+# Defaults to hiera('neutron_api_enabled', false)
#
# [*cinder*]
# (optional) Enable or not Cinder API binding
-# Defaults to false
+# Defaults to hiera('cinder_api_enabled', false)
#
# [*manila*]
# (optional) Enable or not Manila API binding
-# Defaults to false
+# Defaults to hiera('manila_api_enabled', false)
#
# [*sahara*]
# (optional) Enable or not Sahara API binding
-# defaults to false
+# defaults to hiera('sahara_api_enabled', false)
#
# [*trove*]
# (optional) Enable or not Trove API binding
-# defaults to false
+# defaults to hiera('trove_api_enabled', false)
#
# [*glance_api*]
# (optional) Enable or not Glance API binding
-# Defaults to false
+# Defaults to hiera('glance_api_enabled', false)
#
# [*glance_registry*]
# (optional) Enable or not Glance registry binding
-# Defaults to false
+# Defaults to hiera('glance_registry_enabled', false)
#
# [*nova_osapi*]
# (optional) Enable or not Nova API binding
-# Defaults to false
+# Defaults to hiera('nova_api_enabled', false)
#
# [*nova_metadata*]
# (optional) Enable or not Nova metadata binding
-# Defaults to false
+# Defaults to hiera('nova_api_enabled', false)
#
# [*nova_novncproxy*]
# (optional) Enable or not Nova novncproxy binding
-# Defaults to false
+# Defaults to hiera('nova_vncproxy_enabled', false)
#
# [*ceilometer*]
# (optional) Enable or not Ceilometer API binding
-# Defaults to false
+# Defaults to hiera('ceilometer_api_enabled', false)
#
# [*aodh*]
# (optional) Enable or not Aodh API binding
-# Defaults to false
+# Defaults to hiera('aodh_api_enabled', false)
#
# [*gnocchi*]
# (optional) Enable or not Gnocchi API binding
-# Defaults to false
+# Defaults to hiera('gnocchi_api_enabled', false)
#
# [*mistral*]
# (optional) Enable or not Mistral API binding
-# Defaults to false
+# Defaults to hiera('mistral_api_enabled', false)
#
# [*swift_proxy_server*]
# (optional) Enable or not Swift API binding
-# Defaults to false
+# Defaults to hiera('swift_proxy_enabled', false)
#
# [*heat_api*]
# (optional) Enable or not Heat API binding
-# Defaults to false
+# Defaults to hiera('heat_api_enabled', false)
#
# [*heat_cloudwatch*]
# (optional) Enable or not Heat Cloudwatch API binding
-# Defaults to false
+# Defaults to hiera('heat_api_cloudwatch_enabled', false)
#
# [*heat_cfn*]
# (optional) Enable or not Heat CFN API binding
-# Defaults to false
+# Defaults to hiera('heat_api_cfn_enabled', false)
#
# [*horizon*]
# (optional) Enable or not Horizon dashboard binding
-# Defaults to false
+# Defaults to hiera('horizon_enabled', false)
#
# [*ironic*]
# (optional) Enable or not Ironic API binding
-# Defaults to false
+# Defaults to hiera('ironic_enabled', false)
#
# [*ironic_inspector*]
# (optional) Enable or not Ironic Inspector API binding
-# Defaults to false
+# Defaults to hiera('ironic_inspector_enabled', false)
#
# [*mysql*]
# (optional) Enable or not MySQL Galera binding
-# Defaults to false
+# Defaults to hiera('mysql_enabled', false)
#
# [*mysql_clustercheck*]
# (optional) Enable check via clustercheck for mysql
@@ -215,7 +215,7 @@
#
# [*redis*]
# (optional) Enable or not Redis binding
-# Defaults to false
+# Defaults to hiera('redis_enabled', false)
#
# [*redis_password*]
# (optional) Password for Redis authentication, eventually needed by the
@@ -228,11 +228,11 @@
#
# [*zaqar_api*]
# (optional) Enable or not Zaqar Api binding
-# Defaults to false
+# Defaults to hiera('zaqar_api_enabled', false)
#
# [*opendaylight*]
# (optional) Enable or not OpenDaylight binding
-# Defaults to false
+# Defaults to hiera('opendaylight_api_enabled', false)
#
# [*service_ports*]
# (optional) Hash that contains the values to override from the service ports
@@ -303,37 +303,37 @@ class tripleo::haproxy (
$ssl_cipher_suite = '!SSLv2:kEECDH:kRSA:kEDH:kPSK:+3DES:!aNULL:!eNULL:!MD5:!EXP:!RC4:!SEED:!IDEA:!DES',
$ssl_options = 'no-sslv3',
$haproxy_stats_certificate = undef,
- $keystone_admin = false,
- $keystone_public = false,
- $neutron = false,
- $cinder = false,
- $sahara = false,
- $trove = false,
- $manila = false,
- $glance_api = false,
- $glance_registry = false,
- $nova_osapi = false,
- $nova_metadata = false,
- $nova_novncproxy = false,
- $ceilometer = false,
- $aodh = false,
- $gnocchi = false,
- $mistral = false,
- $swift_proxy_server = false,
- $heat_api = false,
- $heat_cloudwatch = false,
- $heat_cfn = false,
- $horizon = false,
- $ironic = false,
- $ironic_inspector = false,
- $mysql = false,
+ $keystone_admin = hiera('keystone_enabled', false),
+ $keystone_public = hiera('keystone_enabled', false),
+ $neutron = hiera('neutron_api_enabled', false),
+ $cinder = hiera('cinder_api_enabled', false),
+ $manila = hiera('manila_api_enabled', false),
+ $sahara = hiera('sahara_api_enabled', false),
+ $trove = hiera('trove_api_enabled', false),
+ $glance_api = hiera('glance_api_enabled', false),
+ $glance_registry = hiera('glance_registry_enabled', false),
+ $nova_osapi = hiera('nova_api_enabled', false),
+ $nova_metadata = hiera('nova_api_enabled', false),
+ $nova_novncproxy = hiera('nova_vncproxy_enabled', false),
+ $ceilometer = hiera('ceilometer_api_enabled', false),
+ $aodh = hiera('aodh_api_enabled', false),
+ $gnocchi = hiera('gnocchi_api_enabled', false),
+ $mistral = hiera('mistral_api_enabled', false),
+ $swift_proxy_server = hiera('swift_proxy_enabled', false),
+ $heat_api = hiera('heat_api_enabled', false),
+ $heat_cloudwatch = hiera('heat_api_cloudwatch_enabled', false),
+ $heat_cfn = hiera('heat_api_cfn_enabled', false),
+ $horizon = hiera('horizon_enabled', false),
+ $ironic = hiera('ironic_api_enabled', false),
+ $ironic_inspector = hiera('ironic_inspector_enabled', false),
+ $mysql = hiera('mysql_enabled', false),
$mysql_clustercheck = false,
$rabbitmq = false,
- $redis = false,
+ $redis = hiera('redis_enabled', false),
$redis_password = undef,
$midonet_api = false,
- $zaqar_api = false,
- $opendaylight = false,
+ $zaqar_api = hiera('zaqar_api_enabled', false),
+ $opendaylight = hiera('opendaylight_api_enabled', false),
$service_ports = {}
) {
$default_service_ports = {
diff --git a/manifests/profile/base/ceph.pp b/manifests/profile/base/ceph.pp
index 94166ac..6ffd4ef 100644
--- a/manifests/profile/base/ceph.pp
+++ b/manifests/profile/base/ceph.pp
@@ -18,22 +18,13 @@
#
# === Parameters
#
-# [*ceph_ipv6*]
-# (Optional) Force daemons to bind on IPv6 addresses
-# Defaults to false
-#
# [*ceph_mon_initial_members*]
# (Optional) List of IP addresses to use as mon_initial_members
-# Defaults to undef
+# Defaults to hiera('ceph_mon_node_names')
#
# [*ceph_mon_host*]
# (Optional) List of IP addresses to use as mon_host
-# Deftauls to undef
-#
-# [*ceph_mon_host_v6*]
-# (Optional) List of IPv6 addresses, surrounded by brackets, used as
-# mon_host when ceph_ipv6 is true
-# Defaults to undef
+# Deftauls to hiera('ceph_mon_node_ips')
#
# [*enable_ceph_storage*]
# (Optional) enable_ceph_storage
@@ -45,22 +36,29 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::ceph (
- $ceph_ipv6 = false,
- $ceph_mon_initial_members = undef,
- $ceph_mon_host = undef,
- $ceph_mon_host_v6 = undef,
+ $ceph_mon_initial_members = hiera('ceph_mon_node_names', undef),
+ $ceph_mon_host = hiera('ceph_mon_node_ips', '127.0.0.1'),
$enable_ceph_storage = false,
$step = hiera('step'),
) {
if $step >= 2 {
if $ceph_mon_initial_members {
- $mon_initial_members = downcase($ceph_mon_initial_members)
+ if is_array($ceph_mon_initial_members) {
+ $mon_initial_members = downcase(join($ceph_mon_initial_members, ','))
+ } else {
+ $mon_initial_members = downcase($ceph_mon_initial_members)
+ }
} else {
$mon_initial_members = undef
}
- if $ceph_ipv6 {
- $mon_host = $ceph_mon_host_v6
+
+ if is_array($ceph_mon_host) {
+ if is_ipv6_address($ceph_mon_host[0]) {
+ $mon_host = join(enclose_ipv6($ceph_mon_host), ',')
+ } else {
+ $mon_host = join($ceph_mon_host, ',')
+ }
} else {
$mon_host = $ceph_mon_host
}
diff --git a/manifests/profile/base/cinder/volume/iscsi.pp b/manifests/profile/base/cinder/volume/iscsi.pp
index d1d22bb..8baaf1c 100644
--- a/manifests/profile/base/cinder/volume/iscsi.pp
+++ b/manifests/profile/base/cinder/volume/iscsi.pp
@@ -52,8 +52,11 @@ class tripleo::profile::base::cinder::volume::iscsi (
size => join([$cinder_lvm_loop_device_size, 'M']),
}
+ # NOTE(gfidente): never emit in hieradata:
+ # key: [ipv6]
+ # as it will cause hiera parsing errors
cinder::backend::iscsi { $backend_name :
- iscsi_ip_address => $cinder_iscsi_address,
+ iscsi_ip_address => normalize_ip_for_uri($cinder_iscsi_address),
iscsi_helper => $cinder_iscsi_helper,
}
}
diff --git a/manifests/profile/base/haproxy.pp b/manifests/profile/base/haproxy.pp
index 4f2f850..68ff3e4 100644
--- a/manifests/profile/base/haproxy.pp
+++ b/manifests/profile/base/haproxy.pp
@@ -82,6 +82,20 @@ class tripleo::profile::base::haproxy (
}
include ::tripleo::haproxy
+
+ unless hiera('tripleo::haproxy::haproxy_service_manage', true) {
+ # Reload HAProxy configuration if the haproxy class has refreshed or any
+ # HAProxy frontend endpoint has changed.
+ exec { 'haproxy-reload':
+ command => 'systemctl reload haproxy',
+ path => ['/usr/bin', '/usr/sbin'],
+ refreshonly => true,
+ onlyif => 'pcs property | grep -q "maintenance-mode.*true"',
+ subscribe => Class['::haproxy']
+ }
+ Haproxy::Listen<||> ~> Exec['haproxy-reload']
+ Haproxy::Balancermember<||> ~> Exec['haproxy-reload']
+ }
}
}
diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp
index 4e60f2f..4dc3770 100644
--- a/manifests/profile/pacemaker/database/mysql.pp
+++ b/manifests/profile/pacemaker/database/mysql.pp
@@ -32,8 +32,17 @@ class tripleo::profile::pacemaker::database::mysql (
$pacemaker_master = false
}
$mysql_bind_host = hiera('mysql_bind_host')
- $galera_nodes = downcase(hiera('galera_node_names', $::hostname))
+
+ # use only mysql_node_names when we land a patch in t-h-t that
+ # switches to autogenerating these values from composable services
+ $galera_node_names_lookup = hiera('mysql_node_names', hiera('galera_node_names', $::hostname))
+ if is_array($galera_node_names_lookup) {
+ $galera_nodes = downcase(join($galera_node_names_lookup, ','))
+ } else {
+ $galera_nodes = downcase($galera_node_names_lookup)
+ }
$galera_nodes_count = count(split($galera_nodes, ','))
+
$mysqld_options = {
'mysqld' => {
'skip-name-resolve' => '1',