Repository: ambari Updated Branches: refs/heads/trunk 55e2af586 -> 6964bff88
AMBARI-20489. HBase service check reports success despite failures (Myroslav Papirkovskyi via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6964bff8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6964bff8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6964bff8 Branch: refs/heads/trunk Commit: 6964bff88d8dcb020027ce852687e3147ae724e4 Parents: 55e2af5 Author: Sumit Mohanty <smoha...@hortonworks.com> Authored: Fri Mar 17 17:42:09 2017 -0700 Committer: Sumit Mohanty <smoha...@hortonworks.com> Committed: Fri Mar 17 18:57:11 2017 -0700 ---------------------------------------------------------------------- .../HBASE/0.96.0.2.0/package/scripts/service_check.py | 3 ++- .../test/python/stacks/2.0.6/HBASE/test_hbase_service_check.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/6964bff8/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/service_check.py index 6f6045c..5184ea7 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/service_check.py @@ -49,7 +49,7 @@ class HbaseServiceCheckDefault(HbaseServiceCheck): env.set_params(params) output_file = "/apps/hbase/data/ambarismoketest" - smokeuser_kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal};") if params.security_enabled else "" + smokeuser_kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal} &&") if params.security_enabled else "" hbase_servicecheck_file = format("{exec_tmp_dir}/hbase-smoke.sh") hbase_servicecheck_cleanup_file = format("{exec_tmp_dir}/hbase-smoke-cleanup.sh") @@ -81,6 +81,7 @@ class HbaseServiceCheckDefault(HbaseServiceCheck): Execute( grantprivelegecmd, user = params.hbase_user, + logoutput = True ) servicecheckcmd = format("{smokeuser_kinit_cmd} {hbase_cmd} --config {hbase_conf_dir} shell {hbase_servicecheck_file}") http://git-wip-us.apache.org/repos/asf/ambari/blob/6964bff8/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_service_check.py index f63abac..60a99ef 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_service_check.py +++ b/ambari-server/src/test/python/stacks/2.0.6/HBASE/test_hbase_service_check.py @@ -85,8 +85,9 @@ class TestServiceCheck(RMFTestCase): ) self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/hbase.headless.keytab hbase; /usr/lib/hbase/bin/hbase shell /tmp/hbase_grant_permissions.sh', user = 'hbase', + logoutput = True ) - self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari...@example.com; /usr/lib/hbase/bin/hbase --config /etc/hbase/conf shell /tmp/hbase-smoke.sh && /tmp/hbaseSmokeVerify.sh /etc/hbase/conf /usr/lib/hbase/bin/hbase && /usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari...@example.com; /usr/lib/hbase/bin/hbase --config /etc/hbase/conf shell /tmp/hbase-smoke-cleanup.sh', + self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari...@example.com && /usr/lib/hbase/bin/hbase --config /etc/hbase/conf shell /tmp/hbase-smoke.sh && /tmp/hbaseSmokeVerify.sh /etc/hbase/conf /usr/lib/hbase/bin/hbase && /usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari...@example.com && /usr/lib/hbase/bin/hbase --config /etc/hbase/conf shell /tmp/hbase-smoke-cleanup.sh', logoutput = True, tries = 6, user = 'ambari-qa',