AgentException errors incorrect logging output

Bug #1316360 reported by Steve McLellan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Medium
Steve McLellan

Bug Description

If an error occurs running agent scripts, the message is received by the engine, the AgentException constructed sets the message information to self.message_info, which means that it gets hidden when it's logged.

For instance:

try:
  raise AgentException({"message": "Errors happened", "errorCode": 100})
except Exception:
  logging.exception("An error happened")
ERROR:root:An error happened
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
AgentException

I think removing the message_info state would be enough to allow the error to be logged properly.

This can be part of https://blueprints.launchpad.net/murano/+spec/improve-engine-logging

Changed in murano:
importance: Undecided → Medium
status: New → Confirmed
Steve McLellan (sjmc7)
Changed in murano:
assignee: nobody → Steve McLellan (sjmc7)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to murano-api (master)

Fix proposed to branch: master
Review: https://review.openstack.org/92392

Changed in murano:
status: Confirmed → In Progress
Changed in murano:
milestone: none → juno-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-api (master)

Reviewed: https://review.openstack.org/92392
Committed: https://git.openstack.org/cgit/stackforge/murano-api/commit/?id=289a1f886d9faa0fbebc296e949ae119bb8c6506
Submitter: Jenkins
Branch: master

commit 289a1f886d9faa0fbebc296e949ae119bb8c6506
Author: Steve McLellan <email address hidden>
Date: Tue May 6 10:26:10 2014 -0500

    Allow AgentExceptions to be logged properly

    Remove the special handling in AgentException so that
    the default Exception behavior is used when logging, and
    details are shown.

    Partially implements blueprint improve-engine-logging
    Closes-Bug: #1316360
    Change-Id: I9730c3e0733f1d6e7d1e40a03aea8499c9605093

Changed in murano:
status: In Progress → Fix Committed
ruhe (ruhe)
Changed in murano:
status: Fix Committed → Fix Released
Changed in murano:
milestone: juno-1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.