Repository: ambari Updated Branches: refs/heads/trunk 4efd4ef31 -> ecfb55c8d
AMBARI-11112. HBase Service Check when adding HBase service (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ecfb55c8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ecfb55c8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ecfb55c8 Branch: refs/heads/trunk Commit: ecfb55c8df612cb59b8c60e9d5ce26c48b69608e Parents: 4efd4ef Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Wed May 13 20:38:29 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Wed May 13 20:38:29 2015 +0300 ---------------------------------------------------------------------- .../0.96.0.2.0/package/scripts/service_check.py | 15 +++------- .../2.0.6/HBASE/test_hbase_service_check.py | 30 ++++---------------- 2 files changed, 10 insertions(+), 35 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/ecfb55c8/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 b774f19..d679314 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 @@ -75,22 +75,15 @@ class HbaseServiceCheckDefault(HbaseServiceCheck): ) servicecheckcmd = format("{smokeuser_kinit_cmd} {hbase_cmd} --config {hbase_conf_dir} shell {hbase_servicecheck_file}") - smokeverifycmd = format("{smokeuser_kinit_cmd} {exec_tmp_dir}/hbaseSmokeVerify.sh {hbase_conf_dir} {service_check_data} {hbase_cmd}") + smokeverifycmd = format("{exec_tmp_dir}/hbaseSmokeVerify.sh {hbase_conf_dir} {service_check_data} {hbase_cmd}") - Execute( servicecheckcmd, - tries = 3, + Execute(format("{servicecheckcmd} && {smokeverifycmd}"), + tries = 6, try_sleep = 5, user = params.smoke_test_user, logoutput = True ) - - Execute ( smokeverifycmd, - tries = 3, - try_sleep = 5, - user = params.smoke_test_user, - logoutput = True - ) - + if __name__ == "__main__": HbaseServiceCheck().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/ecfb55c8/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 368aa58..a5a360a 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 @@ -44,15 +44,9 @@ class TestServiceCheck(RMFTestCase): content = Template('hbase-smoke.sh.j2'), mode = 0755, ) - self.assertResourceCalled('Execute', ' /usr/lib/hbase/bin/hbase --config /etc/hbase/conf shell /tmp/hbase-smoke.sh', + self.assertResourceCalled('Execute', ' /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', logoutput = True, - tries = 3, - user = 'ambari-qa', - try_sleep = 5, - ) - self.assertResourceCalled('Execute', ' /tmp/hbaseSmokeVerify.sh /etc/hbase/conf /usr/lib/hbase/bin/hbase', - logoutput = True, - tries = 3, + tries = 6, user = 'ambari-qa', try_sleep = 5, ) @@ -84,15 +78,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', ) - 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', - logoutput = True, - tries = 3, - user = 'ambari-qa', - try_sleep = 5, - ) - self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari...@example.com; /tmp/hbaseSmokeVerify.sh /etc/hbase/conf /usr/lib/hbase/bin/hbase', + 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', logoutput = True, - tries = 3, + tries = 6, user = 'ambari-qa', try_sleep = 5, ) @@ -114,15 +102,9 @@ class TestServiceCheck(RMFTestCase): content = Template('hbase-smoke.sh.j2'), mode = 0755, ) - self.assertResourceCalled('Execute', ' /usr/hdp/current/hbase-client/bin/hbase --config /usr/hdp/current/hbase-client/conf shell /tmp/hbase-smoke.sh', - logoutput = True, - tries = 3, - user = 'ambari-qa', - try_sleep = 5, - ) - self.assertResourceCalled('Execute', ' /tmp/hbaseSmokeVerify.sh /usr/hdp/current/hbase-client/conf /usr/hdp/current/hbase-client/bin/hbase', + self.assertResourceCalled('Execute', ' /usr/hdp/current/hbase-client/bin/hbase --config /usr/hdp/current/hbase-client/conf shell /tmp/hbase-smoke.sh && /tmp/hbaseSmokeVerify.sh /usr/hdp/current/hbase-client/conf /usr/hdp/current/hbase-client/bin/hbase', logoutput = True, - tries = 3, + tries = 6, user = 'ambari-qa', try_sleep = 5, )