From 74da7dbb8451ae0d85c8f2f9ae0f6619297b227d Mon Sep 17 00:00:00 2001 From: Andrew Laski Date: Fri, 15 Feb 2013 15:07:32 -0500 Subject: Push 'Error' result from event to instance action. Currently a failed event stores an 'Error' result but in order to see which actions have failed it would require grabbing each one through the api to see the events. This patch adds 'Error' to the message field of the instance action so that any actions with failures can be seen from the initial listing of actions on an instance. Change-Id: Ieeb798c47211ab00fe5b767dc1f18a665549ba01 --- nova/db/sqlalchemy/api.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nova/db') diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index eb9181fce..3057a9414 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -4654,6 +4654,10 @@ def action_event_finish(context, values): raise exception.InstanceActionEventNotFound(action_id=action['id'], event=values['event']) event_ref.update(values) + + if values['result'].lower() == 'error': + action.update({'message': 'Error'}) + return event_ref -- cgit