You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2014/11/08 23:09:39 UTC

ambari git commit: AMBARI-8231. HiveService2 alert for unsecure/secure cluster (ncole)

Repository: ambari
Updated Branches:
  refs/heads/branch-1.7.0 9d4d26cb8 -> 989582311


AMBARI-8231. HiveService2 alert for unsecure/secure cluster (ncole)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/98958231
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/98958231
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/98958231

Branch: refs/heads/branch-1.7.0
Commit: 989582311f7153314f8bfcf2ed5cd9ba0f693d53
Parents: 9d4d26c
Author: Nate Cole <nc...@hortonworks.com>
Authored: Sat Nov 8 16:47:30 2014 -0500
Committer: Nate Cole <nc...@hortonworks.com>
Committed: Sat Nov 8 17:08:33 2014 -0500

----------------------------------------------------------------------
 .../resource_management/libraries/functions/hive_check.py      | 2 +-
 .../test/python/stacks/1.3.2/HIVE/test_hive_service_check.py   | 6 +++---
 .../test/python/stacks/2.0.6/HIVE/test_hive_service_check.py   | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/98958231/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py
index 9e6087f..b23e8ff 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/hive_check.py
@@ -35,7 +35,7 @@ def check_thrift_port_sasl(address, port, hive_auth = "NOSASL", key = None, kini
     url = format("jdbc:hive2://{address}:{port}")
 
   if hive_auth != "NOSASL":
-    cmd = format("! beeline -u '{url}' -e '' ") + "2>&1| awk '{print}'|grep Error"
+    cmd = format("! beeline -u '{url}' -e '' ") + "2>&1| awk '{print}'|grep -i 'Connection refused'"
     Execute(cmd,
             path=["/bin/", "/usr/bin/", "/usr/lib/hive/bin/", "/usr/sbin/"],
             timeout=BEELINE_CHECK_TIMEOUT

http://git-wip-us.apache.org/repos/asf/ambari/blob/98958231/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_service_check.py b/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_service_check.py
index f0c2179..748bb43 100644
--- a/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_service_check.py
+++ b/ambari-server/src/test/python/stacks/1.3.2/HIVE/test_hive_service_check.py
@@ -33,7 +33,7 @@ class TestServiceCheck(RMFTestCase):
                         command="service_check",
                         config_file="default.json"
     )
-    self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10000' -e '' 2>&1| awk '{print}'|grep Error",
+    self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10000' -e '' 2>&1| awk '{print}'|grep -i 'Connection refused'",
                               path = ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'],
                               timeout = 30,
                               )
@@ -84,7 +84,7 @@ class TestServiceCheck(RMFTestCase):
                         config_file="secured.json"
     )
     self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa; ',)
-    self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10000/;principal=hive/_HOST@EXAMPLE.COM' -e '' 2>&1| awk '{print}'|grep Error",
+    self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10000/;principal=hive/_HOST@EXAMPLE.COM' -e '' 2>&1| awk '{print}'|grep -i 'Connection refused'",
                               path = ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'],
                               timeout = 30,
                               )
@@ -125,4 +125,4 @@ class TestServiceCheck(RMFTestCase):
                               tries = 3,
                               try_sleep = 5,
                               )
-    self.assertNoMoreResources()
\ No newline at end of file
+    self.assertNoMoreResources()

http://git-wip-us.apache.org/repos/asf/ambari/blob/98958231/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
index 3e82333..23e67b9 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
@@ -82,7 +82,7 @@ class TestServiceCheck(RMFTestCase):
                         config_file="secured.json"
     )
     self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa; ',)
-    self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10000/;principal=hive/_HOST@EXAMPLE.COM' -e '' 2>&1| awk '{print}'|grep Error",
+    self.assertResourceCalled('Execute', "! beeline -u 'jdbc:hive2://c6402.ambari.apache.org:10000/;principal=hive/_HOST@EXAMPLE.COM' -e '' 2>&1| awk '{print}'|grep -i 'Connection refused'",
                               path = ['/bin/', '/usr/bin/', '/usr/lib/hive/bin/', '/usr/sbin/'],
                               timeout= 30,
                               )
@@ -125,4 +125,4 @@ class TestServiceCheck(RMFTestCase):
                               tries = 3,
                               try_sleep = 5,
                               )
-    self.assertNoMoreResources()
\ No newline at end of file
+    self.assertNoMoreResources()