ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Di Li <lovelyco...@yahoo.com.INVALID>
Subject "detected unhandled Python exception" in RHEL's /var/log/messages log
Date Wed, 20 Apr 2016 21:31:30 GMT
Hello folks,

I noticed that everytime Ambari Python script fails with unexpected exception. A "detected
unhandled Python exception" error message is logged in /var/log/messages.  For example, the
Install Package step may fail due to corrupted HDP yum repo cache. When that happened, I saw
the following error message logged in /var/logs/messages.
Apr 11 11:17:55 bdavm1251 abrt: detected unhandled Python exception in '/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py'

It seemed to me that the "unhandled" exception was from the execute() method in script.py
as shown below. where the method has "try" and "finally" but no "expect" part. The script
used to catch the exception. The pieces was removed via AMBARI-11242 as part of the Ambari
server/agent performance optimization.

Could someone explain to me why the "expect" was removed ? Should "expect" be added back so
arbt on RHEL will not log errors into /var/log/messages ?

try:
      method = self.choose_method_to_execute(self.command_name)
      with Environment(self.basedir, tmp_dir=Script.tmp_dir) as env:
        env.config.download_path = Script.tmp_dir
        method(env)
    finally:
      if self.should_expose_component_version(self.command_name):
        self.save_component_version_to_structured_out()


Thanks.

Di

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message