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 6AB6A18641 for ; Wed, 25 Nov 2015 15:19:53 +0000 (UTC) Received: (qmail 32785 invoked by uid 500); 25 Nov 2015 15:19:53 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 32773 invoked by uid 500); 25 Nov 2015 15:19:53 -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 32764 invoked by uid 99); 25 Nov 2015 15:19:53 -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, 25 Nov 2015 15:19:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0D091DFE2E; Wed, 25 Nov 2015 15:19:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dsen@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-14070 App Timeline Server become stopped by itself (Upgrade from 2.1.2 to 2.1.3.0 ) (dsen) Date: Wed, 25 Nov 2015 15:19:53 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/trunk a147e43c8 -> a8b285354 AMBARI-14070 App Timeline Server become stopped by itself (Upgrade from 2.1.2 to 2.1.3.0 ) (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a8b28535 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a8b28535 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a8b28535 Branch: refs/heads/trunk Commit: a8b2853547d53d277bb0a320f74cd99a7dc90ebd Parents: a147e43 Author: Dmytro Sen Authored: Wed Nov 25 17:19:42 2015 +0200 Committer: Dmytro Sen Committed: Wed Nov 25 17:19:42 2015 +0200 ---------------------------------------------------------------------- .../YARN/2.1.0.2.0/package/scripts/service.py | 15 ++++++++------- .../python/stacks/2.1/YARN/test_apptimelineserver.py | 13 ++++++++----- 2 files changed, 16 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/a8b28535/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py index 6070442..6d9aef5 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py @@ -39,13 +39,6 @@ def service(componentName, action='start', serviceName='yarn'): def service(componentName, action='start', serviceName='yarn'): import params - if componentName == 'timelineserver' and serviceName == 'yarn' and action == 'start': - File(params.ats_leveldb_lock_file, - action = "delete", - only_if = format("ls {params.ats_leveldb_lock_file}"), - ignore_failures = True - ) - if serviceName == 'mapreduce' and componentName == 'historyserver': delete_pid_file = True daemon = format("{mapred_bin}/mr-jobhistory-daemon.sh") @@ -68,6 +61,14 @@ def service(componentName, action='start', serviceName='yarn'): # Remove the pid file if its corresponding process is not running. File(pid_file, action = "delete", not_if = check_process) + if componentName == 'timelineserver' and serviceName == 'yarn': + File(params.ats_leveldb_lock_file, + action = "delete", + only_if = format("ls {params.ats_leveldb_lock_file}"), + not_if = check_process, + ignore_failures = True + ) + # Attempt to start the process. Internally, this is skipped if the process is already running. Execute(daemon_cmd, user = usr, not_if = check_process) http://git-wip-us.apache.org/repos/asf/ambari/blob/a8b28535/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py b/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py index 4748fb0..6118cc8 100644 --- a/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py +++ b/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py @@ -55,15 +55,18 @@ class TestAppTimelineServer(RMFTestCase): self.assert_configure_default() - self.assertResourceCalled('File', '/var/log/hadoop-yarn/timeline/leveldb-timeline-store.ldb/LOCK', - only_if='ls /var/log/hadoop-yarn/timeline/leveldb-timeline-store.ldb/LOCK', - action=['delete'], - ignore_failures=True) - self.assertResourceCalled('File', '/var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid', action = ['delete'], not_if = "ambari-sudo.sh su yarn -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid && ps -p `cat /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid`'", ) + + self.assertResourceCalled('File', '/var/log/hadoop-yarn/timeline/leveldb-timeline-store.ldb/LOCK', + only_if='ls /var/log/hadoop-yarn/timeline/leveldb-timeline-store.ldb/LOCK', + action=['delete'], + not_if="ambari-sudo.sh su yarn -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid && ps -p `cat /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid`'", + ignore_failures=True + ) + self.assertResourceCalled('Execute', 'ulimit -c unlimited; export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop-yarn/sbin/yarn-daemon.sh --config /etc/hadoop/conf start timelineserver', not_if = "ambari-sudo.sh su yarn -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid && ps -p `cat /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid`'", user = 'yarn',