Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A2162101B7 for ; Thu, 16 Jan 2014 14:43:22 +0000 (UTC) Received: (qmail 61188 invoked by uid 500); 16 Jan 2014 14:43:22 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 60422 invoked by uid 500); 16 Jan 2014 14:43:20 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 59592 invoked by uid 99); 16 Jan 2014 14:43:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jan 2014 14:43:19 +0000 Date: Thu, 16 Jan 2014 14:43:19 +0000 (UTC) From: "Dmitry Lysnichenko (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-4315) Proposed changes to new resource mgmt logging MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-4315?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D138= 73449#comment-13873449 ]=20 Dmitry Lysnichenko commented on AMBARI-4315: -------------------------------------------- +1 > Proposed changes to new resource mgmt logging > --------------------------------------------- > > Key: AMBARI-4315 > URL: https://issues.apache.org/jira/browse/AMBARI-4315 > Project: Ambari > Issue Type: Bug > Reporter: Andrew Onischuk > Assignee: Andrew Onischuk > Fix For: 1.5.0 > > Attachments: AMBARI-4315.patch > > > Here is a snippet of current logging. > 1) Is the "resource_management" needed? Maybe for DEBUG, but for INFO as = well? > {code} > 2014-01-10 00:51:02,168 - resource_management - DEBUG - Running resource = Directory['/var/log/hadoop/hdfs'] > 2014-01-10 00:51:02,168 - resource_management - DEBUG - Performing action= create on Directory['/var/log/hadoop/hdfs'] > 2014-01-10 00:51:02,168 - resource_management.resource - DEBUG - New reso= urce Execute['true']: {} > 2014-01-10 00:51:02,168 - resource_management - DEBUG - Running resource = Execute['true'] > 2014-01-10 00:51:02,168 - resource_management - DEBUG - Performing action= run on Execute['true'] > 2014-01-10 00:51:02,168 - resource_management.provider - INFO - Executing= Execute['true'] > 2014-01-10 00:51:02,179 - resource_management.resource - DEBUG - New reso= urce Execute['export HADOOP_LIBEXEC_DIR=3D/usr/lib/hadoop/libexec && /usr/l= ib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start datanode']:= {'not_if': u'ls /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid >/dev/null 2= >&1 && ps `cat /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid` >/dev/null 2>= &1', 'user': u'hdfs'} > 2014-01-10 00:51:02,179 - resource_management - DEBUG - Running resource = Execute['export HADOOP_LIBEXEC_DIR=3D/usr/lib/hadoop/libexec && /usr/lib/ha= doop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start datanode'] > 2014-01-10 00:51:02,191 - resource_management - DEBUG - Performing action= run on Execute['export HADOOP_LIBEXEC_DIR=3D/usr/lib/hadoop/libexec && /us= r/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start datanode= '] > 2014-01-10 00:51:02,191 - resource_management.provider - INFO - Executing= Execute['export HADOOP_LIBEXEC_DIR=3D/usr/lib/hadoop/libexec && /usr/lib/h= adoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start datanode'] > {code} > 2) If not, maybe a reorg like this to remove some whitespace and tighten-= up the layout. > {code} > 2014-01-06 23:48:18,627 DEBUG [resource_management] Performing action run= on Execute['/etc/init.d/httpd stop'] > 2014-01-06 23:48:18,627 INFO Executing Execute['/etc/init.d/httpd stop'] > 2014-01-06 23:48:18,647 DEBUG [resource_management] New resource Execute[= 'grep -E 'KeepAlive (On|Off)' /etc/httpd/conf/httpd.conf && sed -i 's/KeepA= live Off/KeepAlive On/' /etc/httpd/conf/httpd.conf || echo 'KeepAlive On' >= > /etc/httpd/conf/httpd.conf']: {} > 2014-01-06 23:48:18,647 DEBUG [resource_management] Running resource Exec= ute['grep -E 'KeepAlive (On|Off)' /etc/httpd/conf/httpd.conf && sed -i 's/K= eepAlive Off/KeepAlive On/' /etc/httpd/conf/httpd.conf || echo 'KeepAlive O= n' >> /etc/httpd/conf/httpd.conf'] > 2014-01-06 23:48:18,648 DEBUG [resource_management] Performing action run= on Execute['grep -E 'KeepAlive (On|Off)' /etc/httpd/conf/httpd.conf && sed= -i 's/KeepAlive Off/KeepAlive On/' /etc/httpd/conf/httpd.conf || echo 'Kee= pAlive On' >> /etc/httpd/conf/httpd.conf'] > 2014-01-06 23:48:18,648 INFO Executing Execute['grep -E 'KeepAlive (On|Of= f)' /etc/httpd/conf/httpd.conf && sed -i 's/KeepAlive Off/KeepAlive On/' /e= tc/httpd/conf/httpd.conf || echo 'KeepAlive On' >> /etc/httpd/conf/httpd.co= nf'] > 2014-01-06 23:48:18,663 DEBUG [resource_management] New resource Execute[= '/etc/init.d/httpd start']: {} > 2014-01-06 23:48:18,663 DEBUG [resource_management] Running resource Exec= ute['/etc/init.d/httpd start'] > 2014-01-06 23:48:18,663 DEBUG [resource_management] Performing action run= on Execute['/etc/init.d/httpd start'] > 2014-01-06 23:48:18,663 INFO Executing Execute['/etc/init.d/httpd start'] > {code} > 3) On the UI side, it would be great to turn off seeing debug. It's usefu= l to be there in case you need those details, but optionally show/don't sho= w in UI. Because then you would end up with this which is very manageable f= or a user to read (this is the above logging w/ DEBUG removed). > {code} > 2014-01-06 23:48:18,627 INFO Executing Execute['/etc/init.d/httpd stop'] > 2014-01-06 23:48:18,648 INFO Executing Execute['grep -E 'KeepAlive (On|Of= f)' /etc/httpd/conf/httpd.conf && sed -i 's/KeepAlive Off/KeepAlive On/' /e= tc/httpd/conf/httpd.conf || echo 'KeepAlive On' >> /etc/httpd/conf/httpd.co= nf'] > 2014-01-06 23:48:18,663 INFO Executing Execute['/etc/init.d/httpd start'] > {code} > 4) Also I propose when you install a package, you also give the detail of= the command used. That's useful to a user. Right now, we show this: > {code} > 2014-01-10 00:50:48,480 - resource_management.provider - INFO Installing = package ambari-log4j > {code} > Would be good to give the actual + specific yum/zypper/etc command being = called, even in INFO: > {code} > 2014-01-10 00:50:48,480 INFO Installing package ambari-log4j [=E2=80=98/u= sr/bin/yum -d 0 -e 0 -y install ambari-log4j=E2=80=99] > {code} -- This message was sent by Atlassian JIRA (v6.1.5#6160)