From a566d6b9b857d78fcc7dcecce1cb3f7c25891ea6 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/ 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.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 +- 65 files changed, 65 insertions(+), 65 deletions(-) diff --git a/manifests/profile/base/aodh.pp b/manifests/profile/base/aodh.pp index 4404f240a..16e8698a3 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 7abd4d6ac..e6f64fed2 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 c5c3348cc..0037e7091 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 685d8b293..f5b1ed042 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 9ba388fdd..889a4636c 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 676f9e233..4048a043c 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 309206b40..86cd6f3a6 100644 --- a/manifests/profile/base/database/mysql.pp +++ b/manifests/profile/base/database/mysql.pp @@ -122,7 +122,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 9e5dc54db..eb416ae56 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 d03b7d792..b78947ea6 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.pp b/manifests/profile/base/gnocchi.pp index d4082c82d..37d2c5619 100644 --- a/manifests/profile/base/gnocchi.pp +++ b/manifests/profile/base/gnocchi.pp @@ -67,7 +67,7 @@ class tripleo::profile::base::gnocchi ( ) { warning('Gnocchi is deprecated and is going to be removed in future.') - 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 dc6e135d1..a1cda3160 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 0a4ca715a..4e415f300 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 5e209fa95..84534b5b2 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 6ff84c0b1..e635e8e7b 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 b71e28087..7d235d2ee 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 8ef602b43..db235fd38 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 836906241..d410fbcab 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 8326a2852..c60ffe451 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 58967b1fe..41911e21f 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 c4436ffb9..33c4182ad 100644 --- a/manifests/profile/base/keystone.pp +++ b/manifests/profile/base/keystone.pp @@ -201,7 +201,7 @@ class tripleo::profile::base::keystone ( $memcached_ips = hiera('memcached_node_ips', []), $keystone_resources_managed = hiera('keystone_resources_managed', 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/manila.pp b/manifests/profile/base/manila.pp index b75136e21..6ed932fe5 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 fe2036494..4d4cc5f22 100644 --- a/manifests/profile/base/manila/api.pp +++ b/manifests/profile/base/manila/api.pp @@ -90,7 +90,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 5018b6002..e99af559f 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 c2b4c0997..ea64a4da2 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 35927cfd1..17a3e8521 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 e0e8b1888..f94e6f53d 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 38a2e85c6..6cc238a39 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 b1ba8be68..0d5dba058 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 6f6f0aa46..f6ae445ff 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 30516d650..4186c2a2e 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 506fc9bab..87887e6eb 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 0ef4c36bc..374c18b26 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 7bae8a421..df05f67ee 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 87782fdd7..62956f35e 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 ae7fe231a..eac00df54 100644 --- a/manifests/profile/base/nova.pp +++ b/manifests/profile/base/nova.pp @@ -96,7 +96,7 @@ class tripleo::profile::base::nova ( $memcached_ips = hiera('memcached_node_ips'), ) { - 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 ffb4a2a81..7f54a3e81 100644 --- a/manifests/profile/base/nova/api.pp +++ b/manifests/profile/base/nova/api.pp @@ -77,7 +77,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 8af7c3b42..458ac3d06 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 4bf3460bb..4aa4d7898 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 57cbcfcac..50b4da23c 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 c4964cc59..e314f6f07 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 = hiera('ovn_dbs_vip', undef), $ovn_nb_port = hiera('ovn::northbound::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 369f8b6e4..593cf681a 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 b3328acfd..08b46088b 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 8b35be97b..d7faa282c 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 470ae165e..684ad63ff 100644 --- a/manifests/profile/base/rabbitmq.pp +++ b/manifests/profile/base/rabbitmq.pp @@ -222,7 +222,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 23ef9f7fa..02db9e6c9 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 9ac541f20..f45e03d7d 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 f4ee3f62f..c1bbb48a9 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 31e65efe9..71dfee409 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 94425b904..275fa70d9 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 5631c2bcd..f6b93e8a8 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 8b31cd8d3..6e4893915 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 8ae1c4a05..1b6d71053 100644 --- a/manifests/profile/pacemaker/cinder/backup_bundle.pp +++ b/manifests/profile/pacemaker/cinder/backup_bundle.pp @@ -72,7 +72,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 7e2af87bb..621e4f592 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 1e5280dc5..fbedac923 100644 --- a/manifests/profile/pacemaker/cinder/volume_bundle.pp +++ b/manifests/profile/pacemaker/cinder/volume_bundle.pp @@ -72,7 +72,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 c9f2b8dc3..f166e6c4b 100644 --- a/manifests/profile/pacemaker/database/mysql.pp +++ b/manifests/profile/pacemaker/database/mysql.pp @@ -114,7 +114,7 @@ class tripleo::profile::pacemaker::database::mysql ( $pcs_tries = hiera('pcs_tries', 20), $open_files_limit = 16384, ) { - 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 9ec1c5a1f..12b4f65f3 100644 --- a/manifests/profile/pacemaker/database/mysql_bundle.pp +++ b/manifests/profile/pacemaker/database/mysql_bundle.pp @@ -167,7 +167,7 @@ class tripleo::profile::pacemaker::database::mysql_bundle ( $step = Integer(hiera('step')), $open_files_limit = 16384, ) { - 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 e95716580..136d5b137 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 f02ed92be..dca381cc6 100644 --- a/manifests/profile/pacemaker/database/redis_bundle.pp +++ b/manifests/profile/pacemaker/database/redis_bundle.pp @@ -128,7 +128,7 @@ class tripleo::profile::pacemaker::database::redis_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/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 890478355..0fcdff69d 100644 --- a/manifests/profile/pacemaker/haproxy_bundle.pp +++ b/manifests/profile/pacemaker/haproxy_bundle.pp @@ -114,7 +114,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 134b4969f..4ba98df61 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 a2bd1814b..d36ea7463 100644 --- a/manifests/profile/pacemaker/manila/share_bundle.pp +++ b/manifests/profile/pacemaker/manila/share_bundle.pp @@ -77,7 +77,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 4e4c5543a..9d526602f 100644 --- a/manifests/profile/pacemaker/ovn_dbs_bundle.pp +++ b/manifests/profile/pacemaker/ovn_dbs_bundle.pp @@ -118,7 +118,7 @@ class tripleo::profile::pacemaker::ovn_dbs_bundle ( $listen_on_master_ip_only = hiera('tripleo::profile::pacemaker::ovn_dbs_bundle::listen_on_master_ip_only', 'yes'), ) { - 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 9c0f342f8..03710dc91 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 4334f0525..27cda8fa2 100644 --- a/manifests/profile/pacemaker/rabbitmq_bundle.pp +++ b/manifests/profile/pacemaker/rabbitmq_bundle.pp @@ -136,7 +136,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