You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Dmitro Lisnichenko <dl...@hortonworks.com> on 2017/05/16 10:15:18 UTC
Review Request 59307: Custom task script should output specific
exception
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59307/
-----------------------------------------------------------
Review request for Ambari, Jonathan Hurley and Nate Cole.
Bugs: AMBARI-21030
https://issues.apache.org/jira/browse/AMBARI-21030
Repository: ambari
Description
-------
{{ru_execute_tasks.py}} has the following function:
{noformat}
def resolve_ambari_config():
config_path = os.path.abspath(AmbariConfig.getConfigFile())
try:
if os.path.exists(config_path):
agent_config.read(config_path)
else:
raise Exception("No config found at %s" % str(config_path))
except Exception, err:
Logger.warn(err)
{noformat}
There was an error parsing the config file, and {{Logger.warn()}} isn't actually defined (Shockingly, it's called {{warning()}}). Even still, changing the code to warning() didn't work either. The exact stack should be printed here with throwback.print_exc() (if {{warning()}} doesn't do it).
Diffs
-----
ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py 4dec16f372
Diff: https://reviews.apache.org/r/59307/diff/1/
Testing
-------
mvn clean test
Thanks,
Dmitro Lisnichenko
Re: Review Request 59307: Custom task script should output specific
exception
Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59307/#review175109
-----------------------------------------------------------
Ship it!
Ship It!
- Alejandro Fernandez
On May 16, 2017, 10:15 a.m., Dmitro Lisnichenko wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59307/
> -----------------------------------------------------------
>
> (Updated May 16, 2017, 10:15 a.m.)
>
>
> Review request for Ambari, Jonathan Hurley and Nate Cole.
>
>
> Bugs: AMBARI-21030
> https://issues.apache.org/jira/browse/AMBARI-21030
>
>
> Repository: ambari
>
>
> Description
> -------
>
> {{ru_execute_tasks.py}} has the following function:
>
> {noformat}
> def resolve_ambari_config():
> config_path = os.path.abspath(AmbariConfig.getConfigFile())
> try:
> if os.path.exists(config_path):
> agent_config.read(config_path)
> else:
> raise Exception("No config found at %s" % str(config_path))
> except Exception, err:
> Logger.warn(err)
> {noformat}
>
> There was an error parsing the config file, and {{Logger.warn()}} isn't actually defined (Shockingly, it's called {{warning()}}). Even still, changing the code to warning() didn't work either. The exact stack should be printed here with throwback.print_exc() (if {{warning()}} doesn't do it).
>
>
> Diffs
> -----
>
> ambari-server/src/main/resources/custom_actions/scripts/ru_execute_tasks.py 4dec16f372
>
>
> Diff: https://reviews.apache.org/r/59307/diff/1/
>
>
> Testing
> -------
>
> mvn clean test
>
>
> Thanks,
>
> Dmitro Lisnichenko
>
>