You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/06/03 14:48:30 UTC

ambari git commit: AMBARI-11647. Non-root Agent: Kerberos Wizard - Check Kerberos fails during Test Kerberos Client (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk fd91efc03 -> 819b67bb3


AMBARI-11647. Non-root Agent: Kerberos Wizard - Check Kerberos fails during Test Kerberos Client (aonishuk)


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

Branch: refs/heads/trunk
Commit: 819b67bb3b264fb6d727918eb0a271b60e10ed69
Parents: fd91efc
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Wed Jun 3 15:47:26 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Wed Jun 3 15:47:26 2015 +0300

----------------------------------------------------------------------
 .../KERBEROS/1.10.3-10/package/scripts/service_check.py     | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/819b67bb/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/service_check.py
index 412d12d..7c09171 100644
--- a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/service_check.py
@@ -60,10 +60,13 @@ class KerberosServiceCheck(KerberosScript):
 
       try:
         # kinit
-        Execute(kinit_command)
+        Execute(kinit_command,
+                user=params.smoke_user
+        )
       finally:
-        if os.path.isfile(ccache_file_path): # Since kinit might fail to write to the cache file for various reasons, an existence check should be done before cleanup
-          os.remove(ccache_file_path)
+        File(ccache_file_path, # Since kinit might fail to write to the cache file for various reasons, an existence check should be done before cleanup
+             action = "delete",
+        )
     elif params.manage_identities:
       err_msg = Logger.filter_text("Failed to execute kinit test due to principal or keytab not found or available")
       raise Fail(err_msg)