ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [2/2] ambari git commit: AMBARI-13565. Oozie alert appears after enabling NN HA, moving NameNode and enabling security (aonishuk)
Date Mon, 26 Oct 2015 17:28:22 GMT
AMBARI-13565. Oozie alert appears after enabling NN HA, moving NameNode and enabling security
(aonishuk)


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

Branch: refs/heads/branch-2.1
Commit: 2f41cc67e5c109af66275c9f61813abd9937856b
Parents: 0097ee0
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Mon Oct 26 19:28:16 2015 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Mon Oct 26 19:28:16 2015 +0200

----------------------------------------------------------------------
 .../4.0.0.2.0/package/alerts/alert_check_oozie_server.py  | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2f41cc67/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
index 764473e..db8f172 100644
--- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
+++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/alerts/alert_check_oozie_server.py
@@ -135,18 +135,14 @@ def get_check_command(oozie_url, host_name, configurations, parameters):
       kerberos_executable_search_paths = configurations[KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY]
 
     klist_path_local = get_klist_path(kerberos_executable_search_paths)
-    klist_command = format("{klist_path_local} -s {ccache_file}")
+    kinit_path_local = get_kinit_path(kerberos_executable_search_paths)
 
     # Determine if we need to kinit by testing to see if the relevant cache exists and has
     # non-expired tickets.  Tickets are marked to expire after 5 minutes to help reduce the
number
     # it kinits we do but recover quickly when keytabs are regenerated
-    return_code, _ = call(klist_command, user=user)
-    if return_code != 0:
-      kinit_path_local = get_kinit_path(kerberos_executable_search_paths)
-      kinit_command = format("{kinit_path_local} -l 5m -kt {user_keytab} {user_principal};
")
 
-      # kinit
-      Execute(kinit_command, environment=kerberos_env, user=user)
+    kinit_command = "{0} -s {1} || ".format(klist_path_local, ccache_file) + format("{kinit_path_local}
-l 5m20s -c {ccache_file} -kt {user_keytab} {user_principal}; ")
+    Execute(kinit_command, environment=kerberos_env, user=user)
 
   # oozie configuration directory uses a symlink when > HDP 2.2
   oozie_config_directory = OOZIE_CONF_DIR_LEGACY


Mime
View raw message