HostState in Scheduler can be incorrect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
In nova-scheduler, we now uses scheduler/
host from a ComputeNode object. At the beginning of this function, we have a few lines of code:
https:/
if (self.updated and compute.updated_at
and self.updated > compute.
return
here we will not update the information if the local update time is later than compute update time.
This is generally correct, since the compute have a periodic task to update the information:
https:/
but it only updates if the resource have changed:
https:/
This can lead to inconsistency if the scheduler have consumed(updated) the information but
then the compute fail to claim (the periodic task won't update because there are no changes).
We can add an time limit as a config to the above mentioned "if" logic, so that if the difference
between current time and self.updated time is larger than the limit, we will also update the
information from ComputeNode object, and avoid the inconsistency between different services.
Changed in nova: | |
assignee: | nobody → Zhenyu Zheng (zhengzhenyu) |
Fix proposed to branch: master /review. openstack. org/260920
Review: https:/