[ 
https://issues.apache.org/jira/browse/AMBARI-12406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Onischuk resolved AMBARI-12406.
--------------------------------------
    Resolution: Fixed

Committed to trunk and branch-2.1

> Can't download client configs with ambari-server installed using non root 
> user 
> -------------------------------------------------------------------------------
>
>                 Key: AMBARI-12406
>                 URL: https://issues.apache.org/jira/browse/AMBARI-12406
>             Project: Ambari
>          Issue Type: Bug
>            Reporter: Andrew Onischuk
>            Assignee: Andrew Onischuk
>             Fix For: 2.1.0
>
>
> **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



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

Reply via email to