From e54d6040a655215996ea9488f1c11517c316f0be Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 7 Apr 2020 14:51:41 -0600 Subject: [PATCH] Add check for bootstrap_node for downcase Downcase in puppet 6.14 throws an error if the input to it is Undef. We can avoid this by checking for a value before trying to downcase. See context https://review.rdoproject.org/r/#/c/26297/ Closes-bug: #1905942 Change-Id: Ib2e97060523a4198a14949a15c9171b56928699c --- manifests/profile/base/aodh.pp | 2 +- manifests/profile/base/aodh/api.pp | 2 +- manifests/profile/base/barbican/api.pp | 2 +- manifests/profile/base/ceilometer/upgrade.pp | 2 +- manifests/profile/base/cinder.pp | 2 +- manifests/profile/base/cinder/api.pp | 2 +- manifests/profile/base/database/mysql.pp | 2 +- manifests/profile/base/designate/central.pp | 2 +- manifests/profile/base/glance/api.pp | 2 +- manifests/profile/base/gnocchi/api.pp | 2 +- manifests/profile/base/heat/api.pp | 2 +- manifests/profile/base/heat/api_cfn.pp | 2 +- manifests/profile/base/heat/engine.pp | 2 +- manifests/profile/base/horizon.pp | 2 +- manifests/profile/base/ironic.pp | 2 +- manifests/profile/base/ironic/api.pp | 2 +- manifests/profile/base/ironic/conductor.pp | 2 +- manifests/profile/base/ironic_inspector.pp | 2 +- manifests/profile/base/keystone.pp | 2 +- manifests/profile/base/manila.pp | 2 +- manifests/profile/base/manila/api.pp | 2 +- manifests/profile/base/mistral.pp | 2 +- manifests/profile/base/mistral/api.pp | 2 +- manifests/profile/base/mistral/engine.pp | 2 +- manifests/profile/base/mistral/event_engine.pp | 2 +- manifests/profile/base/mistral/executor.pp | 2 +- manifests/profile/base/neutron/ovn_northd.pp | 2 +- manifests/profile/base/neutron/plugins/ml2.pp | 2 +- manifests/profile/base/neutron/plugins/nsx.pp | 2 +- manifests/profile/base/neutron/plugins/nuage.pp | 2 +- manifests/profile/base/neutron/plugins/opencontrail.pp | 2 +- manifests/profile/base/neutron/plugins/plumgrid.pp | 2 +- manifests/profile/base/neutron/server.pp | 2 +- manifests/profile/base/nova.pp | 2 +- manifests/profile/base/nova/api.pp | 2 +- manifests/profile/base/nova/conductor.pp | 2 +- manifests/profile/base/nova/ec2api.pp | 2 +- manifests/profile/base/nova/metadata.pp | 2 +- manifests/profile/base/octavia/api.pp | 2 +- manifests/profile/base/panko/api.pp | 2 +- manifests/profile/base/placement.pp | 2 +- manifests/profile/base/placement/api.pp | 2 +- manifests/profile/base/rabbitmq.pp | 2 +- manifests/profile/base/sahara.pp | 2 +- manifests/profile/base/sahara/engine.pp | 2 +- manifests/profile/base/swift/proxy.pp | 2 +- manifests/profile/base/trove/api.pp | 2 +- manifests/profile/base/zaqar.pp | 2 +- manifests/profile/pacemaker/ceph_nfs.pp | 2 +- manifests/profile/pacemaker/cinder/backup.pp | 2 +- manifests/profile/pacemaker/cinder/backup_bundle.pp | 2 +- manifests/profile/pacemaker/cinder/volume.pp | 2 +- manifests/profile/pacemaker/cinder/volume_bundle.pp | 2 +- manifests/profile/pacemaker/database/mysql.pp | 2 +- manifests/profile/pacemaker/database/mysql_bundle.pp | 2 +- manifests/profile/pacemaker/database/redis.pp | 2 +- manifests/profile/pacemaker/database/redis_bundle.pp | 2 +- manifests/profile/pacemaker/haproxy.pp | 2 +- manifests/profile/pacemaker/haproxy_bundle.pp | 2 +- manifests/profile/pacemaker/manila.pp | 2 +- manifests/profile/pacemaker/manila/share_bundle.pp | 2 +- manifests/profile/pacemaker/ovn_dbs_bundle.pp | 2 +- manifests/profile/pacemaker/rabbitmq.pp | 2 +- manifests/profile/pacemaker/rabbitmq_bundle.pp | 2 +- 64 files changed, 64 insertions(+), 64 deletions(-) diff --git a/manifests/profile/base/aodh.pp b/manifests/profile/base/aodh.pp index 77af8bfbf..7ab98491b 100644 --- a/manifests/profile/base/aodh.pp +++ b/manifests/profile/base/aodh.pp @@ -92,7 +92,7 @@ class tripleo::profile::base::aodh ( $oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/aodh/api.pp b/manifests/profile/base/aodh/api.pp index c649eceeb..59835481c 100644 --- a/manifests/profile/base/aodh/api.pp +++ b/manifests/profile/base/aodh/api.pp @@ -56,7 +56,7 @@ class tripleo::profile::base::aodh::api ( $enable_internal_tls = hiera('enable_internal_tls', false), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $is_bootstrap = true } else { $is_bootstrap = false diff --git a/manifests/profile/base/barbican/api.pp b/manifests/profile/base/barbican/api.pp index ffc264ea8..19adacdd4 100644 --- a/manifests/profile/base/barbican/api.pp +++ b/manifests/profile/base/barbican/api.pp @@ -115,7 +115,7 @@ class tripleo::profile::base::barbican::api ( $oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'), $oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/ceilometer/upgrade.pp b/manifests/profile/base/ceilometer/upgrade.pp index 7d319aa12..1f99d1137 100644 --- a/manifests/profile/base/ceilometer/upgrade.pp +++ b/manifests/profile/base/ceilometer/upgrade.pp @@ -32,7 +32,7 @@ class tripleo::profile::base::ceilometer::upgrade ( $bootstrap_node = hiera('gnocchi_api_short_bootstrap_node_name', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/cinder.pp b/manifests/profile/base/cinder.pp index e6e598e09..a5a1d3419 100644 --- a/manifests/profile/base/cinder.pp +++ b/manifests/profile/base/cinder.pp @@ -95,7 +95,7 @@ class tripleo::profile::base::cinder ( $oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'), $oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/cinder/api.pp b/manifests/profile/base/cinder/api.pp index 0cf42de0b..74d3b180e 100644 --- a/manifests/profile/base/cinder/api.pp +++ b/manifests/profile/base/cinder/api.pp @@ -74,7 +74,7 @@ class tripleo::profile::base::cinder::api ( $step = Integer(hiera('step')), $keystone_resources_managed = hiera('keystone_resources_managed', true), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true $manage_type = $keystone_resources_managed } else { diff --git a/manifests/profile/base/database/mysql.pp b/manifests/profile/base/database/mysql.pp index ce307a8cb..7941348af 100644 --- a/manifests/profile/base/database/mysql.pp +++ b/manifests/profile/base/database/mysql.pp @@ -130,7 +130,7 @@ class tripleo::profile::base::database::mysql ( $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/designate/central.pp b/manifests/profile/base/designate/central.pp index fab4736d9..ea6699238 100644 --- a/manifests/profile/base/designate/central.pp +++ b/manifests/profile/base/designate/central.pp @@ -36,7 +36,7 @@ class tripleo::profile::base::designate::central ( $step = Integer(hiera('step')), $pools_file_content = undef, ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/glance/api.pp b/manifests/profile/base/glance/api.pp index b2336d7eb..f1e1fe678 100644 --- a/manifests/profile/base/glance/api.pp +++ b/manifests/profile/base/glance/api.pp @@ -156,7 +156,7 @@ class tripleo::profile::base::glance::api ( # DEPRECATED PARAMETERS $glance_rbd_client_name = undef, ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/gnocchi/api.pp b/manifests/profile/base/gnocchi/api.pp index 32bfd65d6..08347aaee 100644 --- a/manifests/profile/base/gnocchi/api.pp +++ b/manifests/profile/base/gnocchi/api.pp @@ -80,7 +80,7 @@ class tripleo::profile::base::gnocchi::api ( $step = Integer(hiera('step')), $incoming_storage_driver = hiera('incoming_storage_driver', undef), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/heat/api.pp b/manifests/profile/base/heat/api.pp index 3984c49ed..1e5c60eef 100644 --- a/manifests/profile/base/heat/api.pp +++ b/manifests/profile/base/heat/api.pp @@ -55,7 +55,7 @@ class tripleo::profile::base::heat::api ( $heat_api_network = hiera('heat_api_network', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $is_bootstrap = true } else { $is_bootstrap = false diff --git a/manifests/profile/base/heat/api_cfn.pp b/manifests/profile/base/heat/api_cfn.pp index ce6330206..cbf593420 100644 --- a/manifests/profile/base/heat/api_cfn.pp +++ b/manifests/profile/base/heat/api_cfn.pp @@ -55,7 +55,7 @@ class tripleo::profile::base::heat::api_cfn ( $heat_api_cfn_network = hiera('heat_api_cfn_network', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $is_bootstrap = true } else { $is_bootstrap = false diff --git a/manifests/profile/base/heat/engine.pp b/manifests/profile/base/heat/engine.pp index ac33ed6f6..ca36201d5 100644 --- a/manifests/profile/base/heat/engine.pp +++ b/manifests/profile/base/heat/engine.pp @@ -31,7 +31,7 @@ class tripleo::profile::base::heat::engine ( $bootstrap_node = hiera('heat_engine_short_bootstrap_node_name', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/horizon.pp b/manifests/profile/base/horizon.pp index 838ff8cea..aacf7b222 100644 --- a/manifests/profile/base/horizon.pp +++ b/manifests/profile/base/horizon.pp @@ -65,7 +65,7 @@ class tripleo::profile::base::horizon ( $neutron_options = hiera('horizon::neutron_options', {}), $memcached_ips = hiera('memcached_node_ips') ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $is_bootstrap = true } else { $is_bootstrap = false diff --git a/manifests/profile/base/ironic.pp b/manifests/profile/base/ironic.pp index f4ea7bc60..aa9098e9e 100644 --- a/manifests/profile/base/ironic.pp +++ b/manifests/profile/base/ironic.pp @@ -61,7 +61,7 @@ class tripleo::profile::base::ironic ( $oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'), ) { # Database is accessed by both API and conductor, hence it's here. - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/ironic/api.pp b/manifests/profile/base/ironic/api.pp index aa48bf914..c33b615ea 100644 --- a/manifests/profile/base/ironic/api.pp +++ b/manifests/profile/base/ironic/api.pp @@ -57,7 +57,7 @@ class tripleo::profile::base::ironic::api ( include ::tripleo::profile::base::ironic include ::tripleo::profile::base::ironic::authtoken - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $is_bootstrap = true } else { $is_bootstrap = false diff --git a/manifests/profile/base/ironic/conductor.pp b/manifests/profile/base/ironic/conductor.pp index 321886390..98cb3116e 100644 --- a/manifests/profile/base/ironic/conductor.pp +++ b/manifests/profile/base/ironic/conductor.pp @@ -42,7 +42,7 @@ class tripleo::profile::base::ironic::conductor ( ) { include ::tripleo::profile::base::ironic # Database is accessed by both API and conductor, hence it's here. - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/ironic_inspector.pp b/manifests/profile/base/ironic_inspector.pp index af5724d3c..fc2cc8d4f 100644 --- a/manifests/profile/base/ironic_inspector.pp +++ b/manifests/profile/base/ironic_inspector.pp @@ -61,7 +61,7 @@ class tripleo::profile::base::ironic_inspector ( include ::tripleo::profile::base::ironic_inspector::authtoken - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/keystone.pp b/manifests/profile/base/keystone.pp index 72fd8f8cd..e0c9b8a58 100644 --- a/manifests/profile/base/keystone.pp +++ b/manifests/profile/base/keystone.pp @@ -200,7 +200,7 @@ class tripleo::profile::base::keystone ( $memcached_ips = hiera('memcached_node_ips', []), $keystone_resources_managed = hiera('keystone_resources_managed', true), ) { - if $::hostname == downcase($bootstrap_node) and $keystone_resources_managed { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) and $keystone_resources_managed { $sync_db = true $manage_roles = true $manage_endpoint = true diff --git a/manifests/profile/base/manila.pp b/manifests/profile/base/manila.pp index c5aea7c1d..c005531c9 100644 --- a/manifests/profile/base/manila.pp +++ b/manifests/profile/base/manila.pp @@ -90,7 +90,7 @@ class tripleo::profile::base::manila ( $oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'), $oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/manila/api.pp b/manifests/profile/base/manila/api.pp index 96b176d89..0c0b5ac94 100644 --- a/manifests/profile/base/manila/api.pp +++ b/manifests/profile/base/manila/api.pp @@ -95,7 +95,7 @@ class tripleo::profile::base::manila::api ( $enable_internal_tls = hiera('enable_internal_tls', false), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/mistral.pp b/manifests/profile/base/mistral.pp index c5bb650d0..acf4b15d3 100644 --- a/manifests/profile/base/mistral.pp +++ b/manifests/profile/base/mistral.pp @@ -91,7 +91,7 @@ class tripleo::profile::base::mistral ( $oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'), $oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/mistral/api.pp b/manifests/profile/base/mistral/api.pp index eb6fe2ea2..1007aa466 100644 --- a/manifests/profile/base/mistral/api.pp +++ b/manifests/profile/base/mistral/api.pp @@ -60,7 +60,7 @@ class tripleo::profile::base::mistral::api ( $mistral_api_wsgi_enabled = hiera('mistral_wsgi_enabled', true), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $is_bootstrap = true } else { $is_bootstrap = false diff --git a/manifests/profile/base/mistral/engine.pp b/manifests/profile/base/mistral/engine.pp index 4c98809b5..dda56f3a2 100644 --- a/manifests/profile/base/mistral/engine.pp +++ b/manifests/profile/base/mistral/engine.pp @@ -31,7 +31,7 @@ class tripleo::profile::base::mistral::engine ( $bootstrap_node = hiera('mistral_engine_short_bootstrap_node_name', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/mistral/event_engine.pp b/manifests/profile/base/mistral/event_engine.pp index e46677fc8..4d0847735 100644 --- a/manifests/profile/base/mistral/event_engine.pp +++ b/manifests/profile/base/mistral/event_engine.pp @@ -31,7 +31,7 @@ class tripleo::profile::base::mistral::event_engine ( $bootstrap_node = hiera('mistral_event_engine_short_bootstrap_node_name', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/mistral/executor.pp b/manifests/profile/base/mistral/executor.pp index 644fe345e..2255cfdf5 100644 --- a/manifests/profile/base/mistral/executor.pp +++ b/manifests/profile/base/mistral/executor.pp @@ -37,7 +37,7 @@ class tripleo::profile::base::mistral::executor ( $step = Integer(hiera('step')), $docker_group = false, ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/neutron/ovn_northd.pp b/manifests/profile/base/neutron/ovn_northd.pp index ab4d5b8aa..4ce8baf51 100644 --- a/manifests/profile/base/neutron/ovn_northd.pp +++ b/manifests/profile/base/neutron/ovn_northd.pp @@ -32,7 +32,7 @@ class tripleo::profile::base::neutron::ovn_northd ( if $step >= 4 { # Note this only runs on the first node in the cluster when # deployed on a role where multiple nodes exist. - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { include ::ovn::northd } } diff --git a/manifests/profile/base/neutron/plugins/ml2.pp b/manifests/profile/base/neutron/plugins/ml2.pp index 9ad684c7f..730458fbb 100644 --- a/manifests/profile/base/neutron/plugins/ml2.pp +++ b/manifests/profile/base/neutron/plugins/ml2.pp @@ -44,7 +44,7 @@ class tripleo::profile::base::neutron::plugins::ml2 ( $service_names = hiera('service_names'), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/neutron/plugins/nsx.pp b/manifests/profile/base/neutron/plugins/nsx.pp index 976adffba..ba8436aa7 100644 --- a/manifests/profile/base/neutron/plugins/nsx.pp +++ b/manifests/profile/base/neutron/plugins/nsx.pp @@ -31,7 +31,7 @@ class tripleo::profile::base::neutron::plugins::nsx ( $bootstrap_node = hiera('neutron_plugin_nsx_short_bootstrap_node_name', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/neutron/plugins/nuage.pp b/manifests/profile/base/neutron/plugins/nuage.pp index 5e5f06a42..a31f38654 100644 --- a/manifests/profile/base/neutron/plugins/nuage.pp +++ b/manifests/profile/base/neutron/plugins/nuage.pp @@ -29,7 +29,7 @@ class tripleo::profile::base::neutron::plugins::nuage ( $bootstrap_node = hiera('neutron_plugin_nuage_short_bootstrap_node_name', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/neutron/plugins/opencontrail.pp b/manifests/profile/base/neutron/plugins/opencontrail.pp index 84e96301e..72390b367 100644 --- a/manifests/profile/base/neutron/plugins/opencontrail.pp +++ b/manifests/profile/base/neutron/plugins/opencontrail.pp @@ -29,7 +29,7 @@ class tripleo::profile::base::neutron::plugins::opencontrail ( $bootstrap_node = hiera('contrail_neutron_plugin_short_bootstrap_node_name', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/neutron/plugins/plumgrid.pp b/manifests/profile/base/neutron/plugins/plumgrid.pp index 826c08413..116196c8d 100644 --- a/manifests/profile/base/neutron/plugins/plumgrid.pp +++ b/manifests/profile/base/neutron/plugins/plumgrid.pp @@ -31,7 +31,7 @@ class tripleo::profile::base::neutron::plugins::plumgrid ( $bootstrap_node = hiera('neutron_plugin_plumgrid_short_bootstrap_node_name', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/neutron/server.pp b/manifests/profile/base/neutron/server.pp index 182db48ff..b011866a2 100644 --- a/manifests/profile/base/neutron/server.pp +++ b/manifests/profile/base/neutron/server.pp @@ -100,7 +100,7 @@ class tripleo::profile::base::neutron::server ( $tls_proxy_port = 9696, $designate_api_enabled = hiera('designate_api_enabled', false), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/nova.pp b/manifests/profile/base/nova.pp index ab3bab16f..23e1bab13 100644 --- a/manifests/profile/base/nova.pp +++ b/manifests/profile/base/nova.pp @@ -102,7 +102,7 @@ class tripleo::profile::base::nova ( $enable_cache = true, ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/nova/api.pp b/manifests/profile/base/nova/api.pp index 7a590b0b0..5ac60fc84 100644 --- a/manifests/profile/base/nova/api.pp +++ b/manifests/profile/base/nova/api.pp @@ -88,7 +88,7 @@ class tripleo::profile::base::nova::api ( $metadata_tls_proxy_fqdn = undef, $metadata_tls_proxy_port = 8775, ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/nova/conductor.pp b/manifests/profile/base/nova/conductor.pp index 93840fb37..8f9f91635 100644 --- a/manifests/profile/base/nova/conductor.pp +++ b/manifests/profile/base/nova/conductor.pp @@ -34,7 +34,7 @@ class tripleo::profile::base::nova::conductor ( include ::tripleo::profile::base::nova include ::nova::db - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/nova/ec2api.pp b/manifests/profile/base/nova/ec2api.pp index ca383fcaf..39eb43b1d 100644 --- a/manifests/profile/base/nova/ec2api.pp +++ b/manifests/profile/base/nova/ec2api.pp @@ -97,7 +97,7 @@ class tripleo::profile::base::nova::ec2api ( $metadata_tls_proxy_fqdn = undef, $metadata_tls_proxy_port = 8789, ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/nova/metadata.pp b/manifests/profile/base/nova/metadata.pp index 63a915437..5964939be 100644 --- a/manifests/profile/base/nova/metadata.pp +++ b/manifests/profile/base/nova/metadata.pp @@ -53,7 +53,7 @@ class tripleo::profile::base::nova::metadata ( $nova_metadata_network = hiera('nova_metadata_network', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $is_bootstrap = true } else { $is_bootstrap = false diff --git a/manifests/profile/base/octavia/api.pp b/manifests/profile/base/octavia/api.pp index 0e2e67e59..47f5211c5 100644 --- a/manifests/profile/base/octavia/api.pp +++ b/manifests/profile/base/octavia/api.pp @@ -73,7 +73,7 @@ class tripleo::profile::base::octavia::api ( $ovn_db_host = undef, $ovn_nb_port = undef, ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/panko/api.pp b/manifests/profile/base/panko/api.pp index 46668362f..b1824a1b0 100644 --- a/manifests/profile/base/panko/api.pp +++ b/manifests/profile/base/panko/api.pp @@ -60,7 +60,7 @@ class tripleo::profile::base::panko::api ( $enable_panko_expirer = hiera('enable_panko_expirer', true), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/placement.pp b/manifests/profile/base/placement.pp index c7d790281..6afcf0ed5 100644 --- a/manifests/profile/base/placement.pp +++ b/manifests/profile/base/placement.pp @@ -31,7 +31,7 @@ class tripleo::profile::base::placement ( $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/placement/api.pp b/manifests/profile/base/placement/api.pp index 33b7cd3e7..c4d08e1da 100644 --- a/manifests/profile/base/placement/api.pp +++ b/manifests/profile/base/placement/api.pp @@ -53,7 +53,7 @@ class tripleo::profile::base::placement::api ( $placement_network = hiera('placement_network', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $is_bootstrap = true } else { $is_bootstrap = false diff --git a/manifests/profile/base/rabbitmq.pp b/manifests/profile/base/rabbitmq.pp index a9daedaae..75ee035fb 100644 --- a/manifests/profile/base/rabbitmq.pp +++ b/manifests/profile/base/rabbitmq.pp @@ -245,7 +245,7 @@ class tripleo::profile::base::rabbitmq ( } } - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $rabbitmq_bootstrapnode = true } else { $rabbitmq_bootstrapnode = false diff --git a/manifests/profile/base/sahara.pp b/manifests/profile/base/sahara.pp index f01824d17..552d051d9 100644 --- a/manifests/profile/base/sahara.pp +++ b/manifests/profile/base/sahara.pp @@ -90,7 +90,7 @@ class tripleo::profile::base::sahara ( $oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'), $oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/sahara/engine.pp b/manifests/profile/base/sahara/engine.pp index 6d131b144..b6909aead 100644 --- a/manifests/profile/base/sahara/engine.pp +++ b/manifests/profile/base/sahara/engine.pp @@ -31,7 +31,7 @@ class tripleo::profile::base::sahara::engine ( $bootstrap_node = hiera('sahara_engine_short_bootstrap_node_name', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/swift/proxy.pp b/manifests/profile/base/swift/proxy.pp index c07a0ce26..dcaee1ceb 100644 --- a/manifests/profile/base/swift/proxy.pp +++ b/manifests/profile/base/swift/proxy.pp @@ -118,7 +118,7 @@ class tripleo::profile::base::swift::proxy ( $tls_proxy_fqdn = undef, $tls_proxy_port = 8080, ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $is_bootstrap = true } else { $is_bootstrap = false diff --git a/manifests/profile/base/trove/api.pp b/manifests/profile/base/trove/api.pp index 660b261b1..7aa0700d1 100644 --- a/manifests/profile/base/trove/api.pp +++ b/manifests/profile/base/trove/api.pp @@ -31,7 +31,7 @@ class tripleo::profile::base::trove::api ( $bootstrap_node = hiera('trove_api_short_bootstrap_node_name', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true } else { $sync_db = false diff --git a/manifests/profile/base/zaqar.pp b/manifests/profile/base/zaqar.pp index eac8274c5..d51af453b 100644 --- a/manifests/profile/base/zaqar.pp +++ b/manifests/profile/base/zaqar.pp @@ -75,7 +75,7 @@ class tripleo::profile::base::zaqar ( $redis_vip = hiera('redis_vip', undef), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $is_bootstrap = true } else { $is_bootstrap = false diff --git a/manifests/profile/pacemaker/ceph_nfs.pp b/manifests/profile/pacemaker/ceph_nfs.pp index 051c4d3b0..65b982bc6 100644 --- a/manifests/profile/pacemaker/ceph_nfs.pp +++ b/manifests/profile/pacemaker/ceph_nfs.pp @@ -36,7 +36,7 @@ class tripleo::profile::pacemaker::ceph_nfs ( $step = hiera('step'), $pcs_tries = hiera('pcs_tries', 20), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/cinder/backup.pp b/manifests/profile/pacemaker/cinder/backup.pp index 17ed95d06..f1456c468 100644 --- a/manifests/profile/pacemaker/cinder/backup.pp +++ b/manifests/profile/pacemaker/cinder/backup.pp @@ -44,7 +44,7 @@ class tripleo::profile::pacemaker::cinder::backup ( stop => '/bin/true', } - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/cinder/backup_bundle.pp b/manifests/profile/pacemaker/cinder/backup_bundle.pp index 5ba192ae4..2fd856a3a 100644 --- a/manifests/profile/pacemaker/cinder/backup_bundle.pp +++ b/manifests/profile/pacemaker/cinder/backup_bundle.pp @@ -78,7 +78,7 @@ class tripleo::profile::pacemaker::cinder::backup_bundle ( $pcs_tries = hiera('pcs_tries', 20), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/cinder/volume.pp b/manifests/profile/pacemaker/cinder/volume.pp index e9934261a..0ca2857cf 100644 --- a/manifests/profile/pacemaker/cinder/volume.pp +++ b/manifests/profile/pacemaker/cinder/volume.pp @@ -43,7 +43,7 @@ class tripleo::profile::pacemaker::cinder::volume ( stop => '/bin/true', } - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/cinder/volume_bundle.pp b/manifests/profile/pacemaker/cinder/volume_bundle.pp index 3155e898f..be7258e79 100644 --- a/manifests/profile/pacemaker/cinder/volume_bundle.pp +++ b/manifests/profile/pacemaker/cinder/volume_bundle.pp @@ -78,7 +78,7 @@ class tripleo::profile::pacemaker::cinder::volume_bundle ( $tls_priorities = hiera('tripleo::pacemaker::tls_priorities', undef), $bundle_user = 'root', ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp index 55e2527b8..81b038692 100644 --- a/manifests/profile/pacemaker/database/mysql.pp +++ b/manifests/profile/pacemaker/database/mysql.pp @@ -120,7 +120,7 @@ class tripleo::profile::pacemaker::database::mysql ( $open_files_limit = 16384, $promote_timeout = 300, ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/database/mysql_bundle.pp b/manifests/profile/pacemaker/database/mysql_bundle.pp index c54e949c2..8c8f76741 100644 --- a/manifests/profile/pacemaker/database/mysql_bundle.pp +++ b/manifests/profile/pacemaker/database/mysql_bundle.pp @@ -189,7 +189,7 @@ class tripleo::profile::pacemaker::database::mysql_bundle ( $promote_timeout = 300, $force_ocf = false, ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/database/redis.pp b/manifests/profile/pacemaker/database/redis.pp index f3aa3c388..94f4f285c 100644 --- a/manifests/profile/pacemaker/database/redis.pp +++ b/manifests/profile/pacemaker/database/redis.pp @@ -111,7 +111,7 @@ class tripleo::profile::pacemaker::database::redis ( $tls_proxy_fqdn = undef, $tls_proxy_port = 6379, ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/database/redis_bundle.pp b/manifests/profile/pacemaker/database/redis_bundle.pp index c8136736d..d842ab854 100644 --- a/manifests/profile/pacemaker/database/redis_bundle.pp +++ b/manifests/profile/pacemaker/database/redis_bundle.pp @@ -138,7 +138,7 @@ class tripleo::profile::pacemaker::database::redis_bundle ( $bundle_user = 'root', $force_ocf = false, ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/haproxy.pp b/manifests/profile/pacemaker/haproxy.pp index 42ae759bf..e8963fef7 100644 --- a/manifests/profile/pacemaker/haproxy.pp +++ b/manifests/profile/pacemaker/haproxy.pp @@ -61,7 +61,7 @@ class tripleo::profile::pacemaker::haproxy ( manage_firewall => $manage_firewall, } - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/haproxy_bundle.pp b/manifests/profile/pacemaker/haproxy_bundle.pp index 1b5a0a376..02a62d371 100644 --- a/manifests/profile/pacemaker/haproxy_bundle.pp +++ b/manifests/profile/pacemaker/haproxy_bundle.pp @@ -127,7 +127,7 @@ class tripleo::profile::pacemaker::haproxy_bundle ( ) { include ::tripleo::profile::base::haproxy - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/manila.pp b/manifests/profile/pacemaker/manila.pp index 11fa5507e..73e14f01a 100644 --- a/manifests/profile/pacemaker/manila.pp +++ b/manifests/profile/pacemaker/manila.pp @@ -36,7 +36,7 @@ class tripleo::profile::pacemaker::manila ( $step = Integer(hiera('step')), $pcs_tries = hiera('pcs_tries', 20), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/manila/share_bundle.pp b/manifests/profile/pacemaker/manila/share_bundle.pp index 1202589fc..2bd5cd288 100644 --- a/manifests/profile/pacemaker/manila/share_bundle.pp +++ b/manifests/profile/pacemaker/manila/share_bundle.pp @@ -83,7 +83,7 @@ class tripleo::profile::pacemaker::manila::share_bundle ( $pcs_tries = hiera('pcs_tries', 20), $step = Integer(hiera('step')), ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/ovn_dbs_bundle.pp b/manifests/profile/pacemaker/ovn_dbs_bundle.pp index 9621b0a89..3a575279f 100644 --- a/manifests/profile/pacemaker/ovn_dbs_bundle.pp +++ b/manifests/profile/pacemaker/ovn_dbs_bundle.pp @@ -135,7 +135,7 @@ class tripleo::profile::pacemaker::ovn_dbs_bundle ( $force_ocf = false, ) { - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/rabbitmq.pp b/manifests/profile/pacemaker/rabbitmq.pp index 8c4d57a1f..8c411e7a3 100644 --- a/manifests/profile/pacemaker/rabbitmq.pp +++ b/manifests/profile/pacemaker/rabbitmq.pp @@ -86,7 +86,7 @@ class tripleo::profile::pacemaker::rabbitmq ( $rabbit_nodes = [] } - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false diff --git a/manifests/profile/pacemaker/rabbitmq_bundle.pp b/manifests/profile/pacemaker/rabbitmq_bundle.pp index 465f80e8a..5be7f4ba9 100644 --- a/manifests/profile/pacemaker/rabbitmq_bundle.pp +++ b/manifests/profile/pacemaker/rabbitmq_bundle.pp @@ -146,7 +146,7 @@ class tripleo::profile::pacemaker::rabbitmq_bundle ( $rabbit_nodes = [] } - if $::hostname == downcase($bootstrap_node) { + if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $pacemaker_master = true } else { $pacemaker_master = false