You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ma...@apache.org on 2014/02/12 02:53:51 UTC

git commit: AMBARI-4622. WebHCat smoke tests fails in secure mode. (mahadev)

Updated Branches:
  refs/heads/trunk b986691a1 -> d0b03b5f5


AMBARI-4622. WebHCat smoke tests fails in secure mode. (mahadev)


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

Branch: refs/heads/trunk
Commit: d0b03b5f581e929101d2b96cfa62ff8db1f8c5fa
Parents: b986691
Author: Mahadev Konar <ma...@apache.org>
Authored: Tue Feb 11 17:53:39 2014 -0800
Committer: Mahadev Konar <ma...@apache.org>
Committed: Tue Feb 11 17:53:43 2014 -0800

----------------------------------------------------------------------
 .../HDP/1.3.2/services/WEBHCAT/package/scripts/params.py      | 1 +
 .../1.3.2/services/WEBHCAT/package/scripts/service_check.py   | 2 +-
 .../HDP/2.0.6/services/WEBHCAT/package/scripts/params.py      | 1 +
 .../2.0.6/services/WEBHCAT/package/scripts/service_check.py   | 7 ++++---
 .../python/stacks/1.3.2/WEBHCAT/test_webhcat_service_check.py | 4 ++--
 .../python/stacks/2.0.6/WEBHCAT/test_webhcat_service_check.py | 4 ++--
 6 files changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d0b03b5f/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
index d6309bf..804a654 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/params.py
@@ -59,6 +59,7 @@ webhcat_hdfs_user_dir = format("/user/{webhcat_user}")
 webhcat_hdfs_user_mode = 0755
 #for create_hdfs_directory
 hostname = config["hostname"]
+security_param = "true" if security_enabled else "false"
 hadoop_conf_dir = "/etc/hadoop/conf"
 hdfs_user_keytab = config['configurations']['global']['hdfs_user_keytab']
 hdfs_user = config['configurations']['global']['hdfs_user']

http://git-wip-us.apache.org/repos/asf/ambari/blob/d0b03b5f/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
index 58b4d25..d482d8e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/1.3.2/services/WEBHCAT/package/scripts/service_check.py
@@ -32,7 +32,7 @@ class WebHCatServiceCheck(Script):
     )
 
     cmd = format("sh /tmp/templetonSmoke.sh {webhcat_server_host[0]} {smokeuser} {smokeuser_keytab}"
-                 " {security_enabled} {kinit_path_local}",
+                 " {security_param} {kinit_path_local}",
                  smokeuser_keytab=params.smoke_user_keytab if params.security_enabled else "no_keytab")
 
     Execute(cmd,

http://git-wip-us.apache.org/repos/asf/ambari/blob/d0b03b5f/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/params.py
index ed2aa50..75aa75c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/params.py
@@ -64,6 +64,7 @@ webhcat_apps_dir = "/apps/webhcat"
 #for create_hdfs_directory
 hostname = config["hostname"]
 hadoop_conf_dir = "/etc/hadoop/conf"
+security_param = "true" if security_enabled else "false"
 hdfs_user_keytab = config['configurations']['global']['hdfs_user_keytab']
 hdfs_user = config['configurations']['global']['hdfs_user']
 kinit_path_local = functions.get_kinit_path([default("kinit_path_local",None), "/usr/bin", "/usr/kerberos/bin", "/usr/sbin"])

http://git-wip-us.apache.org/repos/asf/ambari/blob/d0b03b5f/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/service_check.py
index 58b4d25..a35771f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/WEBHCAT/package/scripts/service_check.py
@@ -24,15 +24,16 @@ from resource_management import *
 class WebHCatServiceCheck(Script):
   def service_check(self, env):
     import params
+    
     env.set_params(params)
-
+    
     File('/tmp/templetonSmoke.sh',
          content= StaticFile('templetonSmoke.sh'),
          mode=0755
     )
-
+    
     cmd = format("sh /tmp/templetonSmoke.sh {webhcat_server_host[0]} {smokeuser} {smokeuser_keytab}"
-                 " {security_enabled} {kinit_path_local}",
+                 " {security_param} {kinit_path_local}",
                  smokeuser_keytab=params.smoke_user_keytab if params.security_enabled else "no_keytab")
 
     Execute(cmd,

http://git-wip-us.apache.org/repos/asf/ambari/blob/d0b03b5f/ambari-server/src/test/python/stacks/1.3.2/WEBHCAT/test_webhcat_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.2/WEBHCAT/test_webhcat_service_check.py b/ambari-server/src/test/python/stacks/1.3.2/WEBHCAT/test_webhcat_service_check.py
index bc63ad5..a408da4 100644
--- a/ambari-server/src/test/python/stacks/1.3.2/WEBHCAT/test_webhcat_service_check.py
+++ b/ambari-server/src/test/python/stacks/1.3.2/WEBHCAT/test_webhcat_service_check.py
@@ -33,7 +33,7 @@ class TestServiceCheck(RMFTestCase):
                        content = StaticFile('templetonSmoke.sh'),
                        mode = 493,
     )
-    self.assertResourceCalled('Execute', 'sh /tmp/templetonSmoke.sh c6402.ambari.apache.org ambari-qa no_keytab False /usr/bin/kinit',
+    self.assertResourceCalled('Execute', 'sh /tmp/templetonSmoke.sh c6402.ambari.apache.org ambari-qa no_keytab false /usr/bin/kinit',
                        logoutput = True,
                        path = ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'],
                        tries = 3,
@@ -52,7 +52,7 @@ class TestServiceCheck(RMFTestCase):
                        content = StaticFile('templetonSmoke.sh'),
                        mode = 493,
     )
-    self.assertResourceCalled('Execute', 'sh /tmp/templetonSmoke.sh c6402.ambari.apache.org ambari-qa /etc/security/keytabs/smokeuser.headless.keytab True /usr/bin/kinit',
+    self.assertResourceCalled('Execute', 'sh /tmp/templetonSmoke.sh c6402.ambari.apache.org ambari-qa /etc/security/keytabs/smokeuser.headless.keytab true /usr/bin/kinit',
                        logoutput = True,
                        path = ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'],
                        tries = 3,

http://git-wip-us.apache.org/repos/asf/ambari/blob/d0b03b5f/ambari-server/src/test/python/stacks/2.0.6/WEBHCAT/test_webhcat_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/WEBHCAT/test_webhcat_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/WEBHCAT/test_webhcat_service_check.py
index 7ef9000..ba326b5 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/WEBHCAT/test_webhcat_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/WEBHCAT/test_webhcat_service_check.py
@@ -33,7 +33,7 @@ class TestServiceCheck(RMFTestCase):
                        content = StaticFile('templetonSmoke.sh'),
                        mode = 493,
     )
-    self.assertResourceCalled('Execute', 'sh /tmp/templetonSmoke.sh c6402.ambari.apache.org ambari-qa no_keytab False /usr/bin/kinit',
+    self.assertResourceCalled('Execute', 'sh /tmp/templetonSmoke.sh c6402.ambari.apache.org ambari-qa no_keytab false /usr/bin/kinit',
                        logoutput = True,
                        path = ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'],
                        tries = 3,
@@ -52,7 +52,7 @@ class TestServiceCheck(RMFTestCase):
                        content = StaticFile('templetonSmoke.sh'),
                        mode = 493,
     )
-    self.assertResourceCalled('Execute', 'sh /tmp/templetonSmoke.sh c6402.ambari.apache.org ambari-qa /etc/security/keytabs/smokeuser.headless.keytab True /usr/bin/kinit',
+    self.assertResourceCalled('Execute', 'sh /tmp/templetonSmoke.sh c6402.ambari.apache.org ambari-qa /etc/security/keytabs/smokeuser.headless.keytab true /usr/bin/kinit',
                        logoutput = True,
                        path = ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'],
                        tries = 3,