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/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 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'manifests/profile/pacemaker/cinder') diff --git a/manifests/profile/pacemaker/cinder/backup.pp b/manifests/profile/pacemaker/cinder/backup.pp index ff0d8c9..933a735 100644 --- a/manifests/profile/pacemaker/cinder/backup.pp +++ b/manifests/profile/pacemaker/cinder/backup.pp @@ -33,7 +33,7 @@ # class tripleo::profile::pacemaker::cinder::backup ( $bootstrap_node = hiera('cinder_backup_short_bootstrap_node_name'), - $step = hiera('step'), + $step = Integer(hiera('step')), $pcs_tries = hiera('pcs_tries', 20), ) { diff --git a/manifests/profile/pacemaker/cinder/backup_bundle.pp b/manifests/profile/pacemaker/cinder/backup_bundle.pp index cd06986..a5e1a9b 100644 --- a/manifests/profile/pacemaker/cinder/backup_bundle.pp +++ b/manifests/profile/pacemaker/cinder/backup_bundle.pp @@ -40,7 +40,7 @@ class tripleo::profile::pacemaker::cinder::backup_bundle ( $bootstrap_node = hiera('cinder_backup_short_bootstrap_node_name'), $cinder_backup_docker_image = hiera('tripleo::profile::pacemaker::cinder::backup_bundle::cinder_backup_docker_image', undef), $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/cinder/volume.pp b/manifests/profile/pacemaker/cinder/volume.pp index 0d6a598..e993426 100644 --- a/manifests/profile/pacemaker/cinder/volume.pp +++ b/manifests/profile/pacemaker/cinder/volume.pp @@ -33,7 +33,7 @@ # class tripleo::profile::pacemaker::cinder::volume ( $bootstrap_node = hiera('cinder_volume_short_bootstrap_node_name'), - $step = hiera('step'), + $step = Integer(hiera('step')), $pcs_tries = hiera('pcs_tries', 20), ) { Service <| tag == 'cinder::volume' |> { diff --git a/manifests/profile/pacemaker/cinder/volume_bundle.pp b/manifests/profile/pacemaker/cinder/volume_bundle.pp index f0858c9..39199a5 100644 --- a/manifests/profile/pacemaker/cinder/volume_bundle.pp +++ b/manifests/profile/pacemaker/cinder/volume_bundle.pp @@ -40,7 +40,7 @@ class tripleo::profile::pacemaker::cinder::volume_bundle ( $bootstrap_node = hiera('cinder_volume_short_bootstrap_node_name'), $cinder_volume_docker_image = hiera('tripleo::profile::pacemaker::cinder::volume_bundle::cinder_volume_docker_image', undef), $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