From e31d7a9ce230e2991d1a22cf4ecbd8b7f9ca2f88 Mon Sep 17 00:00:00 2001 From: nitishkrishna Date: Mon, 25 Jan 2016 09:52:41 -0800 Subject: [PATCH] Closes-Bug: #1537846 : Bug Fix - wrong resource being called in manifest The resource in new_config_zk_files.pp was reffering to old resource name Patch 2: Wrong quotes used in file_line, database_index was not being set in myid file correctly Patch 3: removed quotes, param will be seen as string literal Patch 4: changed to file from file_line Patch 5: Was doing file resource on link, changed to file Patch 6: Verified change, dependency fixed in config.pp, file content correctly set Change-Id: I0ecdebca505c277312311e0fcb77bafd04f74bfa --- .../modules/contrail/manifests/database/config.pp | 2 +- .../database/new_config_zk_files_setup.pp | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/contrail/environment/modules/contrail/manifests/database/config.pp b/contrail/environment/modules/contrail/manifests/database/config.pp index a800b571..6d0d466a 100644 --- a/contrail/environment/modules/contrail/manifests/database/config.pp +++ b/contrail/environment/modules/contrail/manifests/database/config.pp @@ -164,7 +164,7 @@ # File['/etc/init.d/supervisord-contrail-database'] -> File['/etc/contrail/contrail_setup_utils/config-zk-files-setup.sh'] File['/etc/init.d/supervisord-contrail-database'] -> File['/etc/zookeeper/conf/zoo.cfg'] -> File ['/etc/zookeeper/conf/log4j.properties'] -> File ['/etc/zookeeper/conf/environment'] -> - File ['/var/lib/zookeeper/myid'] + File ['/etc/zookeeper/conf/myid'] } # set high session timeout to survive glance led disk activity # Commented out call to old exec diff --git a/contrail/environment/modules/contrail/manifests/database/new_config_zk_files_setup.pp b/contrail/environment/modules/contrail/manifests/database/new_config_zk_files_setup.pp index 0271d1c1..9cfa1dd6 100644 --- a/contrail/environment/modules/contrail/manifests/database/new_config_zk_files_setup.pp +++ b/contrail/environment/modules/contrail/manifests/database/new_config_zk_files_setup.pp @@ -1,4 +1,4 @@ -class contrail::database::config_zk_files_setup ( +class contrail::database::new_config_zk_files_setup ( $contrail_logoutput = $::contrail::params::contrail_logoutput, $database_index = 1 ) { @@ -49,13 +49,9 @@ } } - file {'/var/lib/zookeeper/myid': - ensure => present, + file {'/etc/zookeeper/conf/myid': + ensure => present, + mode => '0755', + content => "${database_index}", } - -> - file_line { 'Add cfgm_index to Zookeeper ID': - path => '/var/lib/zookeeper/myid', - line => '${database_index}', - } - notify { "executed contrail contrail_zk_exec_cmd : ${contrail_zk_exec_cmd}":; } }