nova instance actions don't have finish time

Bug #1428539 reported by Eli Qiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Low
Unassigned

Bug Description

taget@taget-ThinkStation-P300:~/devstack$ nova instance-action-list tt2
+--------+------------------------------------------+---------+----------------------------+
| Action | Request_ID | Message | Start_Time |
+--------+------------------------------------------+---------+----------------------------+
| create | req-76bac38a-2b04-44cd-a2aa-1b169581c82a | - | 2015-03-05T06:50:06.000000 |
| stop | req-6431b956-d790-4f9e-95a7-a25b5e697910 | - | 2015-03-05T08:08:26.000000 |
| start | req-0da5a5d1-d9f7-4c97-b2cd-7a652c282597 | - | 2015-03-05T08:14:52.000000 |
+--------+------------------------------------------+---------+----------------------------+

query from db , got the finish time is null.

mysql> select * from instance_actions;
+---------------------+---------------------+------------+----+--------+--------------------------------------+------------------------------------------+----------------------------------+----------------------------------+---------------------+---------------------+---------+---------+
| created_at | updated_at | deleted_at | id | action | instance_uuid | request_id | user_id | project_id | start_time | finish_time | message | deleted |
+---------------------+---------------------+------------+----+--------+--------------------------------------+------------------------------------------+----------------------------------+----------------------------------+---------------------+---------------------+---------+---------+
| 2015-03-05 06:42:31 | 2015-03-05 06:42:42 | NULL | 1 | create | 8e126d7b-afbe-4d40-b924-57c3e1a64ca8 | req-7ae89424-c3c3-4d04-8f22-23cc96b1edbd | 4950987b531840e3b546d72476c3d3c2 | 15e4a8cf15da4271ba4e38b5c40e93cc | 2015-03-05 06:42:30 | 2015-03-05 06:42:42 | NULL | 0 |
| 2015-03-05 06:50:07 | 2015-03-05 06:50:26 | NULL | 2 | create | a3f69c3c-f922-4418-8464-508d4740f447 | req-76bac38a-2b04-44cd-a2aa-1b169581c82a | 4950987b531840e3b546d72476c3d3c2 | 15e4a8cf15da4271ba4e38b5c40e93cc | 2015-03-05 06:50:06 | 2015-03-05 06:50:26 | NULL | 0 |
| 2015-03-05 08:08:26 | 2015-03-05 08:08:40 | NULL | 3 | stop | a3f69c3c-f922-4418-8464-508d4740f447 | req-6431b956-d790-4f9e-95a7-a25b5e697910 | 4950987b531840e3b546d72476c3d3c2 | 15e4a8cf15da4271ba4e38b5c40e93cc | 2015-03-05 08:08:26 | 2015-03-05 08:08:40 | NULL | 0 |
| 2015-03-05 08:14:52 | 2015-03-05 08:14:53 | NULL | 4 | start | a3f69c3c-f922-4418-8464-508d4740f447 | req-0da5a5d1-d9f7-4c97-b2cd-7a652c282597 | 4950987b531840e3b546d72476c3d3c2 | 15e4a8cf15da4271ba4e38b5c40e93cc | 2015-03-05 08:14:52 | 2015-03-05 08:14:53 | NULL | 0 |
+---------------------+---------------------+------------+----+--------+--------------------------------------+------------------------------------------+----------------------------------+----------------------------------+---------------------+---------------------+---------+---------+

the reason is that we save the start_time in compute api layer and for some async operations we don't
have a chance to save the finish time.

but instance_actions_events does, it saves the time by create a event (save it in __enter__ and __exit__), we can add
the finish time when instance action event exit , just like what instance_action_event did.

jichenjc (jichenjc)
Changed in nova:
assignee: nobody → jichenjc (jichenjc)
status: New → Confirmed
Revision history for this message
Eli Qiao (taget-9) wrote :

hi jichenjc, do you want to work on it or it's on your todo list ?
 I'v got patch on this bug.

Revision history for this message
jichenjc (jichenjc) wrote :

Eli, I removed myself :)

Changed in nova:
assignee: jichenjc (jichenjc) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Eli Qiao (taget-9)
status: Confirmed → In Progress
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Eli Qiao (<email address hidden>) on branch: master
Review: https://review.openstack.org/162910
Reason: abandon this one, need more discuss on instance action stuff.

Changed in nova:
assignee: Eli Qiao (taget-9) → nobody
status: In Progress → Confirmed
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.