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




ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logfeeder.py
 (line 46)
<https://reviews.apache.org/r/49834/#comment206902>

    Why is needed to pass {sudo} as part of the command instead of passing 
*sudo=true* to Execute()?
    
    If I see it correctly under the hood this invokes *shell.py:_call* method
    
    ```
      # prepare command cmd
      if sudo:
        command = as_sudo(command, env=env)
      elif user:
        command = as_user(command, user, env=env)
    ```
    The as_sudo method return ```return "{0} {1} -H -E 
{2}".format(_get_sudo_binary(), env, command)``` which returns  the command to 
be executed in the format where the LOGFEEDER_INCLUDE passed to the command as 
env variable.


- Sebastian Toader


On July 9, 2016, 12:34 a.m., Oliver Szabo wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49834/
> -----------------------------------------------------------
> 
> (Updated July 9, 2016, 12:34 a.m.)
> 
> 
> Review request for Ambari, Miklos Gergely, Sumit Mohanty, and Sebastian 
> Toader.
> 
> 
> Bugs: AMBARI-17634
>     https://issues.apache.org/jira/browse/AMBARI-17634
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> in Execute environment field is set env variable for agent user, so its not 
> working right with non-root install
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/logfeeder.py
>  9567db2 
>   ambari-server/src/test/python/stacks/2.4/LOGSEARCH/test_logfeeder.py 
> 78e2c5c 
> 
> Diff: https://reviews.apache.org/r/49834/diff/
> 
> 
> Testing
> -------
> 
> Total run:1016
> Total errors:0
> Total failures:0
> 
> 
> Thanks,
> 
> Oliver Szabo
> 
>

Reply via email to