Instance action's updated_at doesn't updated when action created or action event updated.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Yikun Jiang |
Bug Description
Description
===========
When we do some operation on instances, will record some
instance action(such as 'create') in 'instance_actions' table,
and some sub-event will record(such as
compute_
table.
The timestamp(
the action results based on updated_at(the last time the instance
action was updated). But now the record updated time doesn't be
updated when action creating or sub-event of action updating.
So, in this patch, we need update the instance action's updated_at
when instance action events are created and instance action created
or finished.
Steps to reproduce
==================
1. Create a instances
nova boot --image 81e58b1a-
2. Look up record in instance_actions and instance_
mysql> select * from instance_actions\G
*******
created_at: 2017-09-25 07:16:07
updated_at: NULL ---> here
deleted_at: NULL
id: 48
action: create
instance_uuid: fdd52ec6-
request_id: req-511dee3e-
user_id: 1687f2a66222421
project_id: 781b620d86534d5
start_time: 2017-09-25 07:16:05
finish_time: NULL
message: NULL
deleted: 0
mysql> select * from instance_
*******
created_at: 2017-09-25 07:16:07
updated_at: 2017-09-25 07:16:22
deleted_at: NULL
id: 1
action: create
instance_uuid: fdd52ec6-
request_id: req-511dee3e-
user_id: 1687f2a66222421
project_id: 781b620d86534d5
start_time: 2017-09-25 07:16:05
finish_time: NULL
message: NULL
deleted: 0
Expected result
===============
Update the instance action's updated_at when instance action events
are started or finished or instance action created.
Actual result
=============
without instance aciton's updated_at
summary: |
- Instance action's updated_at' doesn't updated when action created or + Instance action's updated_at doesn't updated when action created or action event updated. |
Changed in nova: | |
assignee: | nobody → Yikun Jiang (yikunkero) |
status: | New → In Progress |
description: | updated |
Changed in nova: | |
assignee: | Yikun Jiang (yikunkero) → Matt Riedemann (mriedem) |
Changed in nova: | |
importance: | Undecided → Low |
assignee: | Matt Riedemann (mriedem) → Yikun Jiang (yikunkero) |
Related fix proposed to branch: master /review. openstack. org/507473
Review: https:/