Repository: ambari Updated Branches: refs/heads/trunk 5a93dfd4a -> e019c6c15
AMBARI-13415O. Zookeeper service check fails after converting from root installation to non-root (Juanjo Marron via alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e019c6c1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e019c6c1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e019c6c1 Branch: refs/heads/trunk Commit: e019c6c15026f90370363965070baea1d921d8a9 Parents: 5a93dfd Author: Alejandro Fernandez <[email protected]> Authored: Wed Oct 14 14:06:10 2015 -0700 Committer: Alejandro Fernandez <[email protected]> Committed: Wed Oct 14 14:06:10 2015 -0700 ---------------------------------------------------------------------- .../ZOOKEEPER/3.4.5.2.0/package/files/zkSmoke.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e019c6c1/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/files/zkSmoke.sh ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/files/zkSmoke.sh b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/files/zkSmoke.sh index ea4102d..6838cef 100644 --- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/files/zkSmoke.sh +++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/files/zkSmoke.sh @@ -51,11 +51,25 @@ function verify_output() { fi } +function rename_output(){ + if [ -f $test_output_file ]; then + time=$(date +"%s") + output_file=$(echo $test_output_file | cut -f 1 -d '.') + errors=`mv $test_output_file $output_file$time.out` + if [ "$?" -ne 0 ]; then + echo "Error found in the zookeeper smoke test. Exiting." + echo $errors + exit 1 + fi + fi +} + # Delete /zk_smoketest znode if exists /var/lib/ambari-agent/ambari-sudo.sh su $smoke_user -s /bin/bash - -c "source $conf_dir/zookeeper-env.sh ; echo delete /zk_smoketest | ${zk_cli_shell} -server $zk_node1:$client_port" 2>&1>$test_output_file # Create /zk_smoketest znode on one zookeeper server /var/lib/ambari-agent/ambari-sudo.sh su $smoke_user -s /bin/bash - -c "source $conf_dir/zookeeper-env.sh ; echo create /zk_smoketest smoke_data | ${zk_cli_shell} -server $zk_node1:$client_port" 2>&1>>$test_output_file verify_output +rename_output for i in $zkhosts ; do echo "Running test on host $i"
