You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Robert Levas <rl...@hortonworks.com> on 2014/12/26 18:48:57 UTC

Review Request 29435: Agent is spamming logs with tracebacks of "Error while executing command \'security_status\"

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

Review request for Ambari, Dmitro Lisnichenko, Jaimin Jetly, and Mahadev Konar.


Bugs: AMBARI-8929
    https://issues.apache.org/jira/browse/AMBARI-8929


Repository: ambari


Description
-------

The ambari-agent log is filling up with messages like

```
2014-12-24 21:14:02,209 - Error while executing command \'security_status\':
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 150, in execute
    method = self.choose_method_to_execute(command_name)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 168, 
in choose_method_to_execute
    raise Fail("Script \'{0}\' has no method \'{1}\'".format(sys.argv[0], command_name))
Fail: Script \'/var/lib/ambari-agent/cache/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_master.py\' has no method \'security_status\'
```
This should be corrected by adding a default implementation to avoid such messages.


Diffs
-----

  ambari-common/src/main/python/resource_management/libraries/script/script.py 1cb0ace 

Diff: https://reviews.apache.org/r/29435/diff/


Testing
-------

Manually viewed fix by tail-ing ambari-agent log scanning for `security_status` error messages.  Log now shows the following messages rather than the errors as stated in the descripton:

```
INFO 2014-12-26 17:43:07,863 PythonExecutor.py:119 - Result: {'structuredOut': {u'securityState': u'UNKNOWN'}, 'stdout': '', 'stderr': '', 'exitcode': 0}
```


Thanks,

Robert Levas


Re: Review Request 29435: Agent is spamming logs with tracebacks of "Error while executing command \'security_status\"

Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29435/#review66260
-----------------------------------------------------------

Ship it!


Ship It!

- Dmitro Lisnichenko


On Dec. 26, 2014, 5:48 p.m., Robert Levas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29435/
> -----------------------------------------------------------
> 
> (Updated Dec. 26, 2014, 5:48 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jaimin Jetly, and Mahadev Konar.
> 
> 
> Bugs: AMBARI-8929
>     https://issues.apache.org/jira/browse/AMBARI-8929
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The ambari-agent log is filling up with messages like
> 
> ```
> 2014-12-24 21:14:02,209 - Error while executing command \'security_status\':
> Traceback (most recent call last):
>   File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 150, in execute
>     method = self.choose_method_to_execute(command_name)
>   File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 168, 
> in choose_method_to_execute
>     raise Fail("Script \'{0}\' has no method \'{1}\'".format(sys.argv[0], command_name))
> Fail: Script \'/var/lib/ambari-agent/cache/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_master.py\' has no method \'security_status\'
> ```
> This should be corrected by adding a default implementation to avoid such messages.
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/script/script.py 1cb0ace 
> 
> Diff: https://reviews.apache.org/r/29435/diff/
> 
> 
> Testing
> -------
> 
> Manually viewed fix by tail-ing ambari-agent log scanning for `security_status` error messages.  Log now shows the following messages rather than the errors as stated in the descripton:
> 
> ```
> INFO 2014-12-26 17:43:07,863 PythonExecutor.py:119 - Result: {'structuredOut': {u'securityState': u'UNKNOWN'}, 'stdout': '', 'stderr': '', 'exitcode': 0}
> ```
> 
> 
> Thanks,
> 
> Robert Levas
> 
>


Re: Review Request 29435: Agent is spamming logs with tracebacks of "Error while executing command \'security_status\"

Posted by Mahadev Konar <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29435/#review66917
-----------------------------------------------------------

Ship it!


Ship It!

- Mahadev Konar


On Dec. 26, 2014, 5:48 p.m., Robert Levas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29435/
> -----------------------------------------------------------
> 
> (Updated Dec. 26, 2014, 5:48 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jaimin Jetly, and Mahadev Konar.
> 
> 
> Bugs: AMBARI-8929
>     https://issues.apache.org/jira/browse/AMBARI-8929
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The ambari-agent log is filling up with messages like
> 
> ```
> 2014-12-24 21:14:02,209 - Error while executing command \'security_status\':
> Traceback (most recent call last):
>   File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 150, in execute
>     method = self.choose_method_to_execute(command_name)
>   File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 168, 
> in choose_method_to_execute
>     raise Fail("Script \'{0}\' has no method \'{1}\'".format(sys.argv[0], command_name))
> Fail: Script \'/var/lib/ambari-agent/cache/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_master.py\' has no method \'security_status\'
> ```
> This should be corrected by adding a default implementation to avoid such messages.
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/script/script.py 1cb0ace 
> 
> Diff: https://reviews.apache.org/r/29435/diff/
> 
> 
> Testing
> -------
> 
> Manually viewed fix by tail-ing ambari-agent log scanning for `security_status` error messages.  Log now shows the following messages rather than the errors as stated in the descripton:
> 
> ```
> INFO 2014-12-26 17:43:07,863 PythonExecutor.py:119 - Result: {'structuredOut': {u'securityState': u'UNKNOWN'}, 'stdout': '', 'stderr': '', 'exitcode': 0}
> ```
> 
> 
> Thanks,
> 
> Robert Levas
> 
>