-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48348/#review137127
-----------------------------------------------------------




ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logfeeder.py
 (line 94)
<https://reviews.apache.org/r/48348/#comment202285>

    also this won't work for cases of switchover from root to non-root. or for 
changing non-root.
    
    Please apply this to fix it:
    
    diff --git a/ambari-agent/conf/unix/ambari-agent 
b/ambari-agent/conf/unix/ambari-agent
    index b38b872..d35caab 100755
    --- a/ambari-agent/conf/unix/ambari-agent
    +++ b/ambari-agent/conf/unix/ambari-agent
    @@ -62,6 +62,7 @@ OK=1
     NOTOK=0
     
     current_user=`id -u -n`
    +current_group=`id -g -n`
     
     if [ "$EUID" -ne 0 ] ; then
       echo "" | sudo -S -l > /dev/null 2>&1
    @@ -81,7 +82,7 @@ change_files_permissions() {
            ambari-sudo.sh mkdir -p "$AMBARI_PID_DIR"
            ambari-sudo.sh chown -R $current_user "$AMBARI_PID_DIR/"
            ambari-sudo.sh mkdir -p "$AMBARI_AGENT_LOG_DIR"
    -       ambari-sudo.sh chown -R $current_user "$AMBARI_AGENT_LOG_DIR/"
    +       ambari-sudo.sh chown -R $current_user:$current_group 
"$AMBARI_AGENT_LOG_DIR/"
            ambari-sudo.sh chown -R $current_user "/var/lib/ambari-agent/data/"
            ambari-sudo.sh chown -R $current_user "/var/lib/ambari-agent/cache/"
            ambari-sudo.sh chown    $current_user "/usr/lib/ambari-agent/"


- Andrew Onischuk


On June 10, 2016, 3:08 p.m., Oliver Szabo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48348/
> -----------------------------------------------------------
> 
> (Updated June 10, 2016, 3:08 p.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk, Don Bosco Durai, Miklos Gergely, 
> Robert Nettleton, Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-17089
>     https://issues.apache.org/jira/browse/AMBARI-17089
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> - Change logfeeder process/files to use sudo user instead of 
> logfeeder/logfeeder user/group (to make sure logfeeder can read any kind of 
> the logs).
> - solr and logsearch user both moved to hadoop group
> 
> 
> Diffs
> -----
> 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py
>  73619a3 
>   
> ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/metadata.py
>  2525d9f 
>   
> ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
>  09a86f2 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml
>  0b6e7ab 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml
>  93cf30d 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml
>  56ce721 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-solr-env.xml
>  ff048b4 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logfeeder.py
>  c0689f3 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py
>  7acdec2 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logfeeder.py
>  5ca2bd5 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logsearch.py
>  890e8c6 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logsearch_solr.py
>  6e71334 
>   ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py 
> bfd07b2 
>   ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py 
> 981319c 
>   ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logsearch.py 
> bfe6921 
>   ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_solr.py 0590dca 
>   ambari-server/src/test/python/stacks/2.5/ATLAS/test_atlas_server.py 7127451 
>   ambari-server/src/test/python/stacks/2.5/configs/default.json 1015593 
>   ambari-web/app/data/HDP2/site_properties.js 794da25 
> 
> Diff: https://reviews.apache.org/r/48348/diff/
> 
> 
> Testing
> -------
> 
> FT: tested locally with 4 node cluster with umask 0027.
> 
> 
> Thanks,
> 
> Oliver Szabo
> 
>

Reply via email to