)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1349526b076ff60d97816f6f7891d81342a7d274","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Eli Qiao \u003cliyong.qiao@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-10 17:06:31 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Record finishe time of instance_action"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds objects.InstanceAction.action_finish to __exit__"},{"line_number":10,"context_line":"of EventReporter, so after each instance action event exit, it will"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a80dd14_4a0b78d5","line":7,"updated":"2015-03-10 12:51:56.000000000","message":"finishe \u003d\u003e finish","commit_id":"39a8a5519986b77defcc22f274d8b9b29d5bfc1c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"1349526b076ff60d97816f6f7891d81342a7d274","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds objects.InstanceAction.action_finish to __exit__"},{"line_number":10,"context_line":"of EventReporter, so after each instance action event exit, it will"},{"line_number":11,"context_line":"update the finish time of the rlated instance action."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug 1428539"},{"line_number":14,"context_line":"Change-Id: I3fd2c86dda824e24d11b39dcb6283cee5eaaccc4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a80dd14_6a0e7ce6","line":11,"updated":"2015-03-10 12:51:56.000000000","message":"rlated  \u003d\u003e related","commit_id":"39a8a5519986b77defcc22f274d8b9b29d5bfc1c"}],"nova/compute/utils.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"35cff6f8192689befc2dd048fd43b27400eb7097","unresolved":false,"context_lines":[{"line_number":497,"context_line":"            objects.InstanceActionEvent.event_finish_with_failure("},{"line_number":498,"context_line":"                self.context, uuid, self.event_name, exc_val\u003dexc_val,"},{"line_number":499,"context_line":"                exc_tb\u003dexc_tb, want_result\u003dFalse)"},{"line_number":500,"context_line":"            objects.InstanceAction.action_finish(self.context,"},{"line_number":501,"context_line":"                uuid, want_result\u003dFalse)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_14ab278a","line":500,"updated":"2015-03-11 14:37:00.000000000","message":"The problem with this is that the action could appear finished before it actually is.  If there are two events that need to happen and the first one sets the action to finished, the user of the API doesn\u0027t know that it\u0027s going to have a different finished time later.","commit_id":"39a8a5519986b77defcc22f274d8b9b29d5bfc1c"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"0082b4105cbae78925d63fa5afe9844c58c0c5c9","unresolved":false,"context_lines":[{"line_number":497,"context_line":"            objects.InstanceActionEvent.event_finish_with_failure("},{"line_number":498,"context_line":"                self.context, uuid, self.event_name, exc_val\u003dexc_val,"},{"line_number":499,"context_line":"                exc_tb\u003dexc_tb, want_result\u003dFalse)"},{"line_number":500,"context_line":"            objects.InstanceAction.action_finish(self.context,"},{"line_number":501,"context_line":"                uuid, want_result\u003dFalse)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_b6fc0441","line":500,"in_reply_to":"9a80dd14_14ab278a","updated":"2015-03-12 01:32:09.000000000","message":"hi Andrew, thanks for reviewing.\n\nI did a real environment testing for this situation, take unshelve action as example:\n\nfor unshelve , there are 3 event get_image_info, schedule_instances and compute_unshelve_instance: \nafter apply my patch, \n\nin table instance_actions: \n\n| 2015-03-11 01:17:55 | 2015-03-11 01:18:05 | NULL       | 57 | unshelve      | a33a72dd-6f28-4dfa-bd25-b8feb787a2c3 | req-ab380515-cf88-43ca-8de1-e5ac6a9bbdee | 4950987b531840e3b546d72476c3d3c2 | 15e4a8cf15da4271ba4e38b5c40e93cc | 2015-03-11 01:17:55 | 2015-03-11 01:18:05 | NULL    |       0 |\n\n2015-03-11 01:18:05 is the finish time which is same with the last action event \u0027compute_unshelve_instance\u0027\n\nand in instance_actions_events:\n\nmysql\u003e select * from instance_actions_events where action_id\u003d57;\n+---------------------+---------------------+------------+----+---------------------------+-----------+---------------------+---------------------+---------+-----------+---------+------+---------+\n| created_at          | updated_at          | deleted_at | id | event                     | action_id | start_time          | finish_time         | result  | traceback | deleted | host | details |\n+---------------------+---------------------+------------+----+---------------------------+-----------+---------------------+---------------------+---------+-----------+---------+------+---------+\n| 2015-03-11 01:17:55 | 2015-03-11 01:17:55 | NULL       | 88 | get_image_info            |        57 | 2015-03-11 01:17:55 | 2015-03-11 01:17:55 | Success | NULL      |       0 | NULL | NULL    |\n| 2015-03-11 01:17:55 | 2015-03-11 01:17:55 | NULL       | 89 | schedule_instances        |        57 | 2015-03-11 01:17:55 | 2015-03-11 01:17:55 | Success | NULL      |       0 | NULL | NULL    |\n| 2015-03-11 01:17:55 | 2015-03-11 01:18:05 | NULL       | 90 | compute_unshelve_instance |        57 | 2015-03-11 01:17:55 | 2015-03-11 01:18:05 | Success | NULL      |       0 | NULL | NULL    |\n+---------------------+---------------------+------------+----+---------------------------+-----------+---------------------+---------------------+---------+-----------+---------+------+---------+\n\nso, for action action_id\u003d57, objects.InstanceAction.action_finish was called 3 time(this is the disadvantage), and finish time is set to the last one.","commit_id":"39a8a5519986b77defcc22f274d8b9b29d5bfc1c"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"0c3ae0f53bc86912014d406d4873dcada0068334","unresolved":false,"context_lines":[{"line_number":497,"context_line":"            objects.InstanceActionEvent.event_finish_with_failure("},{"line_number":498,"context_line":"                self.context, uuid, self.event_name, exc_val\u003dexc_val,"},{"line_number":499,"context_line":"                exc_tb\u003dexc_tb, want_result\u003dFalse)"},{"line_number":500,"context_line":"            objects.InstanceAction.action_finish(self.context,"},{"line_number":501,"context_line":"                uuid, want_result\u003dFalse)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_bd52e532","line":500,"in_reply_to":"9a80dd14_7d55f1c4","updated":"2015-03-13 03:19:45.000000000","message":"yes, this may be a problem.\n\nbut currently, we can\u0027t even get the status of the action, nova client only show the start time, and for detail , we need to query instance action event table again to check all of the events to see if the action is failed or succeed.\n\nthe question here is user can not get enough information from instance action table to get know if the action is done correctly ,and when is starting and finished.\n\nfrom nova compute said, because we set start time in nova api, for some async action, there is no chance for use to get know if the action is done succeed.\n\nI know there is notification in nova now, to send message to rpc server to indicate some action , and celometer will handler this. I wonder what the outlook of instance in nova? will be deprecate in feature ? do we need to spend more time on fix this issue?\n\nEli.","commit_id":"39a8a5519986b77defcc22f274d8b9b29d5bfc1c"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"e4972118eba551ed5a78760fe6108386a77d177c","unresolved":false,"context_lines":[{"line_number":497,"context_line":"            objects.InstanceActionEvent.event_finish_with_failure("},{"line_number":498,"context_line":"                self.context, uuid, self.event_name, exc_val\u003dexc_val,"},{"line_number":499,"context_line":"                exc_tb\u003dexc_tb, want_result\u003dFalse)"},{"line_number":500,"context_line":"            objects.InstanceAction.action_finish(self.context,"},{"line_number":501,"context_line":"                uuid, want_result\u003dFalse)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_7d55f1c4","line":500,"in_reply_to":"9a80dd14_b6fc0441","updated":"2015-03-12 13:49:32.000000000","message":"Right, I do believe that the finish time will be set to the last one.  My concern is that if I\u0027m polling the instance action and I see a finish time that is set I would like to assume that the action is finished.  With this implementation that may not be true, so I never know if the action is finished or if I should wait for another thing to complete.","commit_id":"39a8a5519986b77defcc22f274d8b9b29d5bfc1c"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"67e5fd956cc187bbcb13b4037e49538157b0eda3","unresolved":false,"context_lines":[{"line_number":497,"context_line":"            objects.InstanceActionEvent.event_finish_with_failure("},{"line_number":498,"context_line":"                self.context, uuid, self.event_name, exc_val\u003dexc_val,"},{"line_number":499,"context_line":"                exc_tb\u003dexc_tb, want_result\u003dFalse)"},{"line_number":500,"context_line":"            objects.InstanceAction.action_finish(self.context,"},{"line_number":501,"context_line":"                uuid, want_result\u003dFalse)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_c2dcb6e6","line":500,"in_reply_to":"9a80dd14_bd52e532","updated":"2015-03-16 14:56:34.000000000","message":"I would like to see this deprecated, but there is no plan to do so yet.  The limitations of instance actions come from not being able to model what\u0027s involved in an action.  The code in place around this now has no idea if an action-event is the last one for that action or not, so it\u0027s not feasible to record an end time. Right now the way to know if an action has finished on an instance is to poll the task_state and vm_state.\n\nLonger term I think we should model what\u0027s involved in a task in Nova and then we can record timings and success/failure of the task as a whole in addition to the parts.","commit_id":"39a8a5519986b77defcc22f274d8b9b29d5bfc1c"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"fecfda8758c0b0faf68e3fd0aa5eb535546f48e3","unresolved":false,"context_lines":[{"line_number":497,"context_line":"            objects.InstanceActionEvent.event_finish_with_failure("},{"line_number":498,"context_line":"                self.context, uuid, self.event_name, exc_val\u003dexc_val,"},{"line_number":499,"context_line":"                exc_tb\u003dexc_tb, want_result\u003dFalse)"},{"line_number":500,"context_line":"            objects.InstanceAction.action_finish(self.context,"},{"line_number":501,"context_line":"                uuid, want_result\u003dFalse)"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_a6296cf4","line":500,"in_reply_to":"9a80dd14_c2dcb6e6","updated":"2015-03-17 09:19:58.000000000","message":"hi Andrew, thank for reply me.\nokay, seem this patch don\u0027t make sense, I will abandon it.\n\nfor \u0027model a task\u0027 you mentioned, my understanding is model all instance action(task) to a object ? I am a little confused.\n\nI would be glad if you can answer (1 or 2 words is okay), thanks in advance.\n\n-Eli.","commit_id":"39a8a5519986b77defcc22f274d8b9b29d5bfc1c"}]}
