Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 449D1188DD for ; Mon, 26 Oct 2015 17:28:28 +0000 (UTC) Received: (qmail 7172 invoked by uid 500); 26 Oct 2015 17:28:22 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 7073 invoked by uid 500); 26 Oct 2015 17:28:21 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 6900 invoked by uid 99); 26 Oct 2015 17:28:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2015 17:28:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id BB582E0593; Mon, 26 Oct 2015 17:28:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aonishuk@apache.org To: commits@ambari.apache.org Date: Mon, 26 Oct 2015 17:28:22 -0000 Message-Id: <9da6b8bf47a0487080ff520039237bd8@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/2] ambari git commit: AMBARI-13565. Oozie alert appears after enabling NN HA, moving NameNode and enabling security (aonishuk) 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 Authored: Mon Oct 26 19:28:16 2015 +0200 Committer: Andrew Onishuk 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