Public bug reported:

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.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1428539

Title:
  nova instance actions don't have finish time

Status in OpenStack Compute (Nova):
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1428539/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to