[
https://issues.apache.org/jira/browse/AMBARI-14247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15045107#comment-15045107
]
Hudson commented on AMBARI-14247:
---------------------------------
FAILURE: Integrated in Ambari-branch-2.2 #25 (See
[https://builds.apache.org/job/Ambari-branch-2.2/25/])
AMBARI-14247. Most tasks fail in non-root in case of advanced sudoers
(aonishuk:
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=8527f761993f2379036bd14a49f9247674961f8a])
* ambari-common/src/main/python/resource_management/core/sudo.py
> Most tasks fail in non-root in case of advanced sudoers settings
> ----------------------------------------------------------------
>
> Key: AMBARI-14247
> URL: https://issues.apache.org/jira/browse/AMBARI-14247
> Project: Ambari
> Issue Type: Bug
> Reporter: Andrew Onischuk
> Assignee: Andrew Onischuk
> Fix For: 2.2.0
>
>
> This happens because we parse output of a sudo command. And if any warning or
> error output happened during parsing of sudoers or during work of sudo binary.
> We will fail.
> For me this was caused by temporary network failure:
>
>
> root@gu1207:/usr/lib/python2.6/site-packages/resource_management/core#
> sudo echo
> sudo: waring: unable to resolve host gu1207
> 1 2 3
>
> But can happen due to any other output from sudo.
> Stack trace:
>
>
> 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 217, in execute
> method(env)
> File
> "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py",
> line 31, in hook
> setup_hadoop_env()
> File
> "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py",
> line 142, in setup_hadoop_env
> Directory(params.hadoop_dir, mode=0755)
> File
> "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line
> 154, in __init__
> self.env.run()
> File
> "/usr/lib/python2.6/site-packages/resource_management/core/environment.py",
> line 158, in run
> self.run_action(resource, action)
> File
> "/usr/lib/python2.6/site-packages/resource_management/core/environment.py",
> line 121, in run_action
> provider_action()
> File
> "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py",
> line 164, in action_create
> mode=self.resource.mode, cd_access=self.resource.cd_access)
> File
> "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py",
> line 60, in _ensure_metadata
> stat = sudo.stat(path)
> File
> "/usr/lib/python2.6/site-packages/resource_management/core/sudo.py", line
> 216, in stat
> return Stat(path)
> File
> "/usr/lib/python2.6/site-packages/resource_management/core/sudo.py", line
> 213, in __init__
> uid_str, gid_str, mode_str = out.split(' ')
> ValueError: too many values to unpack
> Error: Error: Unable to run the custom hook script ['/usr/bin/python2',
> '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py',
> 'ANY', '/var/lib/ambari-agent/data/command-157.json',
> '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY',
> '/var/lib/ambari-agent/data/structured-out-157.json', 'INFO',
> '/var/lib/ambari-agent/tmp']
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)