incubator-ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Onischuk (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-3558) Resource Manager. On resource fail should give actual error messages, not just exceptions and Enable passing lists to Execute() to fix the user escape errors
Date Mon, 21 Oct 2013 10:34:42 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-3558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13800532#comment-13800532
] 

Andrew Onischuk commented on AMBARI-3558:
-----------------------------------------

Now the code looks like this:
{code}
Traceback (most recent call last):
  File "/root/workspace/tests/tests/test1.py", line 22, in <module>
    main()
  File "/root/workspace/tests/tests/test1.py", line 19, in main
    env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/environment.py", line 117, in
run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/environment.py", line 78, in
run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/providers/service.py", line 11,
in action_start
    self._exec_cmd("start", 0)
  File "/usr/lib/python2.6/site-packages/resource_management/providers/service.py", line 57,
in _exec_cmd
    self, command, self.resource.service_name, ret, out))
resource_management.exceptions.Fail: ServiceProvider[Service['iptables']] command start for
service iptables failed with return code: 127. 
{code}

also now we can forget about espcaping sttrings in shell commands problem, since this patch
enables passing a tuple of arguments right to popen
{code}
    Execute(('rm','-rf','test.txt'),

            ...)
{code}

> Resource Manager. On resource fail should give actual error messages, not just exceptions
and Enable passing lists to Execute() to fix the user escape errors 
> --------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-3558
>                 URL: https://issues.apache.org/jira/browse/AMBARI-3558
>             Project: Ambari
>          Issue Type: Bug
>          Components: agent
>            Reporter: Andrew Onischuk
>            Assignee: Andrew Onischuk
>             Fix For: 1.5.0
>
>
> A lot resources are based on execing different cmd commands, so when these commands fail,
we have very unhelpfull messages.
> Here how it looks like:
> {code}
> Traceback (most recent call last):
>   File "/root/workspace/tests/tests/test1.py", line 13, in <module>
>     main()
>   File "/root/workspace/tests/tests/test1.py", line 10, in main
>     env.run()
>   File "/usr/lib/python2.6/site-packages/resource_management/environment.py", line 117,
in run
>     self.run_action(resource, action)
>   File "/usr/lib/python2.6/site-packages/resource_management/environment.py", line 78,
in run_action
>     provider_action()
>   File "/usr/lib/python2.6/site-packages/resource_management/providers/service/__init__.py",
line 32, in action_reload
>     self._exec_cmd("reload", 0)
>   File "/usr/lib/python2.6/site-packages/resource_management/providers/service/__init__.py",
line 58, in _exec_cmd
>     self, command, self.resource.service_name))
> resource_management.exceptions.Fail: RedhatServiceProvider[Service['ambari-agent']] command
reload for service ambari-agent failed
> {code}
> Here how it should looklike:
> {code}
> Traceback (most recent call last):
>   File "/root/workspace/tests/tests/test1.py", line 13, in <module>
>     main()
>   File "/root/workspace/tests/tests/test1.py", line 10, in main
>     env.run()
>   File "/usr/lib/python2.6/site-packages/resource_management/environment.py", line 117,
in run
>     self.run_action(resource, action)
>   File "/usr/lib/python2.6/site-packages/resource_management/environment.py", line 78,
in run_action
>     provider_action()
>   File "/usr/lib/python2.6/site-packages/resource_management/providers/service/__init__.py",
line 32, in action_reload
>     self._exec_cmd("reload", 0)
>   File "/usr/lib/python2.6/site-packages/resource_management/providers/service/__init__.py",
line 58, in _exec_cmd self, command, self.resource.service_name))
> resource_management.exceptions.Fail: Command 'yum -e 0 -d 0 install hadoop-dfs -y' failed
with return code 1:
> No package a available.
> Error: Nothing to do
> {code}
> This will help a lot in future for users of the resource manager.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message