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

Ship it!


Ship It!

- Dmitro Lisnichenko


On July 14, 2015, 1:26 p.m., Andrew Onischuk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/36476/
> -----------------------------------------------------------
> 
> (Updated July 14, 2015, 1:26 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-12406
>     https://issues.apache.org/jira/browse/AMBARI-12406
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> **The reason:**  
> Ambari-server as non-root uses ambari-agent/ambari-sudo.sh within download
> configs custom command.  
> **The problem causes the following:**  
> 1\. If ambari-server runs as non-root, and don't have sudo access (which is
> not a must for server) download configs fails.  
> 2\. If ambari-server (running as non-root) is on the node where there is no
> ambari-agent download configs fails
> 
> full stack trace
> 
>     
>     
>     org.apache.ambari.server.controller.spi.SystemException: Execution of 
> "ambari-python-wrap 
> /var/lib/ambari-server/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn_client.py
>  generate_configs 
> /var/lib/ambari-server/data/tmp/YARN_CLIENT-configuration.json 
> /var/lib/ambari-server/resources/common-services/YARN/2.1.0.2.0/package 
> /var/lib/ambari-server/data/tmp/structured-out.json INFO 
> /var/lib/ambari-server/data/tmp" returned 1. java.lang.Throwable: 2015-07-13 
> 09:46:20,446 - Directory['/var/lib/ambari-server/data/tmp'] {'recursive': 
> True}
>     2015-07-13 09:46:20,622 - Creating directory 
> Directory['/var/lib/ambari-server/data/tmp']
>     Traceback (most recent call last):
>       File 
> "/var/lib/ambari-server/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn_client.py",
>  line 65, in 
>         YarnClient().execute()
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
>  line 218, in execute
>         method(env)
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
>  line 531, in generate_configs
>         Directory(self.get_tmp_dir(), recursive=True)
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 
> 157, in __init__
>         self.env.run()
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", 
> line 152, in run
>         self.run_action(resource, action)
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", 
> line 118, in run_action
>         provider_action()
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py",
>  line 155, in action_create
>         sudo.makedirs(path, self.resource.mode or 0755)
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/core/sudo.py", line 
> 128, in makedirs
>         shell.checked_call(["mkdir", "-p", path], sudo=True)
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 
> 70, in inner
>         result = function(command, **kwargs)
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 
> 92, in checked_call
>         tries=tries, try_sleep=try_sleep)
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 
> 140, in _call_wrapper
>         result = _call(command, **kwargs_copy)
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 
> 291, in _call
>         raise Fail(err_msg)
>     resource_management.core.exceptions.Fail: Execution of 'mkdir -p 
> /var/lib/ambari-server/data/tmp' returned 1. sudo: no tty present and no 
> askpass program specified
> 
> working on getting cluster with reproduce, should be available in 1-2 hours
> 
> 
> Diffs
> -----
> 
>   ambari-server/conf/unix/ambari-env.sh 2e700da 
>   ambari-server/conf/unix/ambari-sudo.sh PRE-CREATION 
>   ambari-server/pom.xml cb0648b 
>   ambari-server/src/main/python/ambari_server/serverConfiguration.py cf7ab4b 
> 
> Diff: https://reviews.apache.org/r/36476/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>

Reply via email to