Author: smohanty
Date: Tue May 14 22:47:40 2013
New Revision: 1482633
URL: http://svn.apache.org/r1482633
Log:
AMBARI-2135. Ambari agent start say to look at .out, not .log. (smohanty)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-agent/conf/unix/ambari-agent
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1482633&r1=1482632&r2=1482633&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue May 14 22:47:40 2013
@@ -852,6 +852,8 @@ Trunk (unreleased changes):
BUG FIXES
+ AMBARI-2135. Ambari agent start say to look at .out, not .log. (smohanty)
+
AMBARI-2134. Set default value of oozie property
"oozie.service.AuthorizationService.authorization.enabled" to true. (jaimin)
Modified: incubator/ambari/trunk/ambari-agent/conf/unix/ambari-agent
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/conf/unix/ambari-agent?rev=1482633&r1=1482632&r2=1482633&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/conf/unix/ambari-agent (original)
+++ incubator/ambari/trunk/ambari-agent/conf/unix/ambari-agent Tue May 14
22:47:40 2013
@@ -24,7 +24,8 @@ export AMBARI_CONF_DIR=/etc/ambari-serve
AMBARI_AGENT=ambari-agent
PIDFILE=/var/run/ambari-agent/$AMBARI_AGENT.pid
-LOGFILE=/var/log/ambari-agent/ambari-agent.out
+OUTFILE=/var/log/ambari-agent/ambari-agent.out
+LOGFILE=/var/log/ambari-agent/ambari-agent.log
AGENT_SCRIPT=/usr/lib/python2.6/site-packages/ambari_agent/main.py
OK=1
NOTOK=0
@@ -48,6 +49,10 @@ if [ -a /var/lib/ambari-agent/ambari-env
. /var/lib/ambari-agent/ambari-env.sh
fi
+if [ ! -z $AMBARI_LOG_DIR ]; then
+ LOGFILE=$AMBARI_LOG_DIR/ambari-agent.log
+fi
+
if [ -z $RESOLVED_AMBARI_PASSPHRASE ] && [ ! -z $AMBARI_PASSPHRASE ]; then
RESOLVED_AMBARI_PASSPHRASE=$AMBARI_PASSPHRASE
# If the passphrase is not defined yet, use the value from the env file
@@ -96,7 +101,7 @@ case "$1" in
fi
fi
echo "Starting ambari-agent"
- nohup $PYTHON $AGENT_SCRIPT > $LOGFILE 2>&1 &
+ nohup $PYTHON $AGENT_SCRIPT > $OUTFILE 2>&1 &
sleep 2
PID=$!
echo "Verifying $AMBARI_AGENT process status..."
@@ -108,6 +113,7 @@ case "$1" in
echo "Ambari Agent successfully started"
tput sgr0
echo "Agent PID at: $PIDFILE"
+ echo "Agent outout at: $OUTFILE"
echo "Agent log at: $LOGFILE"
;;
status)
@@ -121,6 +127,7 @@ case "$1" in
echo "$AMBARI_AGENT running."
tput sgr0
echo "Agent PID at: $PIDFILE"
+ echo "Agent outout at: $OUTFILE"
echo "Agent log at: $LOGFILE"
fi
else