Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 60CBE200C39 for ; Wed, 1 Mar 2017 21:38:21 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5F947160B90; Wed, 1 Mar 2017 20:38:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 99881160B89 for ; Wed, 1 Mar 2017 21:38:20 +0100 (CET) Received: (qmail 82602 invoked by uid 500); 1 Mar 2017 20:38:19 -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 82030 invoked by uid 99); 1 Mar 2017 20:38:19 -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; Wed, 01 Mar 2017 20:38:19 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C1862DF9AF; Wed, 1 Mar 2017 20:38:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ncole@apache.org To: commits@ambari.apache.org Date: Wed, 01 Mar 2017 20:38:26 -0000 Message-Id: In-Reply-To: <9c72adfbbb654bd999bb88ba75165887@git.apache.org> References: <9c72adfbbb654bd999bb88ba75165887@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [09/50] ambari git commit: AMBARI-20233. [Yarn 3.0] "refresh yarn queue" takes 20 minutes to fail (aonishuk) archived-at: Wed, 01 Mar 2017 20:38:21 -0000 AMBARI-20233. [Yarn 3.0] "refresh yarn queue" takes 20 minutes to fail (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d5efb772 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d5efb772 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d5efb772 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: d5efb77276443257ef49baaed1994e2204c623bd Parents: 5cf5e31 Author: Andrew Onishuk Authored: Tue Feb 28 15:07:11 2017 +0200 Committer: Andrew Onishuk Committed: Tue Feb 28 15:07:11 2017 +0200 ---------------------------------------------------------------------- .../YARN/3.0.0.3.0/package/scripts/service.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/d5efb772/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/service.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/service.py b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/service.py index e0d6475..1c612ef 100644 --- a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/service.py +++ b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/service.py @@ -25,6 +25,7 @@ from resource_management.core.shell import as_user, as_sudo from resource_management.libraries.functions.show_logs import show_logs from resource_management.libraries.functions.format import format from resource_management.core.resources.system import Execute, File +from resource_management.core.signal_utils import TerminateStrategy @OsFamilyFuncImpl(os_family=OSConst.WINSRV_FAMILY) def service(componentName, action='start', serviceName='yarn'): @@ -103,4 +104,10 @@ def service(componentName, action='start', serviceName='yarn'): elif action == 'refreshQueues': rm_kinit_cmd = params.rm_kinit_cmd refresh_cmd = format("{rm_kinit_cmd} export HADOOP_LIBEXEC_DIR={hadoop_libexec_dir} && {yarn_container_bin}/yarn rmadmin -refreshQueues") - Execute(refresh_cmd, user=usr) + Execute(refresh_cmd, + user = usr, + timeout = 20, # when Yarn is not started command hangs forever and should be killed + tries = 5, + try_sleep = 5, + timeout_kill_strategy = TerminateStrategy.KILL_PROCESS_GROUP, # the process cannot be simply killed by 'kill -15', so kill pg group instread. + )