You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Nahappan Somasundaram (JIRA)" <ji...@apache.org> on 2015/09/01 06:53:45 UTC

[jira] [Created] (AMBARI-12953) Ambari Agent logging set up incorrect

Nahappan Somasundaram created AMBARI-12953:
----------------------------------------------

             Summary: Ambari Agent logging set up incorrect
                 Key: AMBARI-12953
                 URL: https://issues.apache.org/jira/browse/AMBARI-12953
             Project: Ambari
          Issue Type: Bug
          Components: ambari-agent
    Affects Versions: 2.2.0
            Reporter: Nahappan Somasundaram
            Assignee: Nahappan Somasundaram
             Fix For: 2.2.0


PROBLEM: The customer wanted to change their Ambari Agent logging location for the default /var/log/ambari-agent location to another place. They initially changed the LOGFILE and OUTFILE environment variables in /usr/sbin/ambari-agent and although this changed the displayed log and out file location when starting the Ambari Agent, only the out file was written to the new location.

BUSINESS IMPACT: Customer not able to write logs to correct location

SUPPORT ANALYSIS: Digging in to the code it seems that the Ambari Agent will honour the path specified by the environment variable AMBARI_AGENT_LOG_DIR. However:

* The /usr/sbin/ambari-agent script uses the environment variable AMBARI_LOG_DIR (lines 91 and 92) and doesn't set LOGFILE to the correct location if AMBARI_AGENT_LOG_DIR is set.
* /etc/init.d/ambari-agent doesn't use the -l switch on the bash command line when starting the Ambari Agent as root (line 27) so all environment variables defined in the profile for root are ignored.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)