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/10/26 18:28:21 UTC

[1/2] ambari git commit: AMBARI-13565. Oozie alert appears after enabling NN HA, moving NameNode and enabling security (aonishuk)

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 <ao...@hortonworks.com>
Authored: Mon Oct 26 19:28:13 2015 +0200
Committer: Andrew Onishuk <ao...@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


[2/2] ambari git commit: AMBARI-13565. Oozie alert appears after enabling NN HA, moving NameNode and enabling security (aonishuk)

Posted by ao...@apache.org.
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 <ao...@hortonworks.com>
Authored: Mon Oct 26 19:28:16 2015 +0200
Committer: Andrew Onishuk <ao...@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