From 94f13e66089cc0b18d5b4b2f6e204160d836ac3e Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Mon, 22 May 2017 10:40:14 +1200 Subject: Ensure hiera step value is an integer The step is typically set with the hieradata setting an integer value: {"step": 1} However it would be useful for the value to be a string so that substitutions are possible, for example: {"step": "%{::step}"} This change ensures the step parameter defaults to an integer by calling Integer(hiera('step')) This change was made by manually removing the undef defaults from fluentd.pp, uchiwa.pp, and sensu.pp then bulk updating with: find ./ -type f -print0 |xargs -0 sed -i "s/= hiera('step')/= Integer(hiera('step'))/" Change-Id: I8a47ca53a7dea8391103abcb8960a97036a6f5b3 --- 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 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'manifests/profile/pacemaker/database') diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp index d42d557..3aff62f 100644 --- a/manifests/profile/pacemaker/database/mysql.pp +++ b/manifests/profile/pacemaker/database/mysql.pp @@ -44,7 +44,7 @@ class tripleo::profile::pacemaker::database::mysql ( $bootstrap_node = hiera('mysql_short_bootstrap_node_name'), $bind_address = $::hostname, $gmcast_listen_addr = hiera('mysql_bind_host'), - $step = hiera('step'), + $step = Integer(hiera('step')), $pcs_tries = hiera('pcs_tries', 20), ) { if $::hostname == downcase($bootstrap_node) { diff --git a/manifests/profile/pacemaker/database/mysql_bundle.pp b/manifests/profile/pacemaker/database/mysql_bundle.pp index a127a5c..56e9e28 100644 --- a/manifests/profile/pacemaker/database/mysql_bundle.pp +++ b/manifests/profile/pacemaker/database/mysql_bundle.pp @@ -56,7 +56,7 @@ class tripleo::profile::pacemaker::database::mysql_bundle ( $bind_address = $::hostname, $gmcast_listen_addr = hiera('mysql_bind_host'), $pcs_tries = hiera('pcs_tries', 20), - $step = hiera('step'), + $step = Integer(hiera('step')), ) { if $::hostname == downcase($bootstrap_node) { $pacemaker_master = true diff --git a/manifests/profile/pacemaker/database/redis.pp b/manifests/profile/pacemaker/database/redis.pp index 4f5a861..bc91be7 100644 --- a/manifests/profile/pacemaker/database/redis.pp +++ b/manifests/profile/pacemaker/database/redis.pp @@ -46,7 +46,7 @@ class tripleo::profile::pacemaker::database::redis ( $bootstrap_node = hiera('redis_short_bootstrap_node_name'), $enable_load_balancer = hiera('enable_load_balancer', true), - $step = hiera('step'), + $step = Integer(hiera('step')), $redis_file_limit = undef, $pcs_tries = hiera('pcs_tries', 20), ) { diff --git a/manifests/profile/pacemaker/database/redis_bundle.pp b/manifests/profile/pacemaker/database/redis_bundle.pp index 8e30c2f..dd090d7 100644 --- a/manifests/profile/pacemaker/database/redis_bundle.pp +++ b/manifests/profile/pacemaker/database/redis_bundle.pp @@ -45,7 +45,7 @@ class tripleo::profile::pacemaker::database::redis_bundle ( $redis_docker_image = hiera('tripleo::profile::pacemaker::database::redis_bundle::redis_docker_image', undef), $redis_docker_control_port = hiera('tripleo::profile::pacemaker::database::redis_bundle::control_port', '3124'), $pcs_tries = hiera('pcs_tries', 20), - $step = hiera('step'), + $step = Integer(hiera('step')), ) { if $::hostname == downcase($bootstrap_node) { $pacemaker_master = true -- cgit 1.2.3-korg