updated_at field is set on the instance only after it is scheduled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Medium
|
Nalini Varshney |
Bug Description
When we added the update_at field to the instance versioned notifications it become visible that nova update the updated_at field of the instance only after the instance is scheduled. However before that step the instance already goes through two state transition and therefore two instance.update notification is emitted with updated_at field being None. This looks contradicting.
Steps to reproduce
==================
* (Apply https:/
* Boot an instance
* Observe the update_at field of the instance.update notifications
Expected result
===============
Every instance.update notification has updated_at field set
Actual result
=============
The first two instance.update notification is emitted with updated_at field being None
Environment
===========
* devstack or nova functional test environment with the test case: nova.tests.
Changed in nova: | |
status: | New → Confirmed |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
assignee: | Balazs Gibizer (balazs-gibizer) → nobody |
status: | In Progress → Confirmed |
Changed in nova: | |
assignee: | nobody → Nalini Varshney (varshneyg) |
* First instance.update sent here https:/ /github. com/openstack/ nova/blob/ 57473088857014d 7f46c17ffb3a476 e09e0db30f/ nova/conductor/ manager. py#L976
* Second instance.update sent through this instance.save() https:/ /github. com/openstack/ nova/blob/ 57473088857014d 7f46c17ffb3a476 e09e0db30f/ nova/compute/ manager. py#L1785
* Third (the first with updated_at set) instance.update sent through resource_tracker instance_claim that will set the node and the host https:/ /github. com/openstack/ nova/blob/ 57473088857014d 7f46c17ffb3a476 e09e0db30f/ nova/compute/ manager. py#L1937