Andrew Onischuk created AMBARI-20081:
----------------------------------------
Summary: Install actions fail when switching from root to non-root.
Key: AMBARI-20081
URL: https://issues.apache.org/jira/browse/AMBARI-20081
Project: Ambari
Issue Type: Bug
Reporter: Andrew Onischuk
Assignee: Andrew Onischuk
Fix For: 2.5.0
Attachments: AMBARI-20081.patch
1\. Deploy cluster with ambari-agent running as root and umask 027
2\. Switch to non-root
3\. Trigger install action
Traceback (most recent call last):
File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py",
line 35, in <module>
BeforeAnyHook().execute()
File
"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
line 313, in execute
method(env)
File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py",
line 32, in hook
setup_java()
File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py",
line 218, in setup_java
Execute(install_cmd,
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py",
line 155, in __init__
self.env.run()
File
"/usr/lib/python2.6/site-packages/resource_management/core/environment.py",
line 160, in run
self.run_action(resource, action)
File
"/usr/lib/python2.6/site-packages/resource_management/core/environment.py",
line 124, in run_action
provider_action()
File
"/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py",
line 262, in action_run
tries=self.resource.tries, try_sleep=self.resource.try_sleep)
File
"/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 72,
in inner
result = function(command, **kwargs)
File
"/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 102,
in checked_call
tries=tries, try_sleep=try_sleep,
timeout_kill_strategy=timeout_kill_strategy)
File
"/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 150,
in _call_wrapper
result = _call(command, **kwargs_copy)
File
"/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 303,
in _call
raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of 'cd
/var/lib/ambari-agent/tmp/jdk_tmp_CN9C5F && tar -xf
/var/lib/ambari-agent/tmp/jdk-8u112-linux-x64.tar.gz && ambari-sudo.sh cp -rp
/var/lib/ambari-agent/tmp/jdk_tmp_CN9C5F/* /usr/jdk64' returned 2. tar:
/var/lib/ambari-agent/tmp/jdk-8u112-linux-x64.tar.gz: Cannot open: Permission
denied
tar: Error is not recoverable: exiting now
Error: Error: Unable to run the custom hook script ['/usr/bin/python',
'/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py',
'ANY', '/var/lib/ambari-agent/data/command-145.json',
'/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY',
'/var/lib/ambari-agent/data/structured-out-145.json', 'INFO',
'/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1']
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)