ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [1/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:21 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 0097ee079 -> 2f41cc67e
  refs/heads/trunk b030c4f23 -> 8cdb2a8e9


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/8cdb2a8e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8cdb2a8e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8cdb2a8e

Branch: refs/heads/trunk
Commit: 8cdb2a8e94dd1852dace111b76fb4037195ee6c7
Parents: b030c4f
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Mon Oct 26 19:28:13 2015 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Mon Oct 26 19:28:13 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/8cdb2a8e/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