heal_instance_info_cache_interval config is not effective
Bug #1274317 reported by
Weiwen Chen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Matthew Gilliard |
Bug Description
There is configuration item in /etc/nova/nova.conf that controls how often the instance info should be updated. By default the value is 60 seconds. However, the current implementation only uses that value to prevent over clocked. Configure it to a different value in nova.conf does not has impact how often the task is executed.
If I change the code in /usr/lib/
@periodic_
def _heal_instance_
tags: | added: compute |
Changed in nova: | |
assignee: | nobody → Phil Day (philip-day) |
assignee: | Phil Day (philip-day) → nobody |
Changed in nova: | |
assignee: | nobody → Phil Day (philip-day) |
Changed in nova: | |
assignee: | Phil Day (philip-day) → Matthew Gilliard (matthew-gilliard-u) |
Changed in nova: | |
status: | New → In Progress |
Changed in nova: | |
status: | In Progress → Fix Released |
Changed in nova: | |
milestone: | none → icehouse-rc1 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | icehouse-rc1 → 2014.1 |
To post a comment you must log in.
The current code does attempt to correctly only refresh the cache at the configured interval, by checking if the configured time has elapsed since the last time it ran:
https:/ /github. com/openstack/ nova/blob/ master/ nova/compute/ manager. py#L4482- L4485
However this assumes that the period task itself will be called at least as frequently as heal_instance_ info_cache_ interval.
The overall period task scheduler runs at the interval set by min(DEFAULT_ INTERVAL= 60, <any intervals declared by decorators)
https:/ /github. com/openstack/ nova/blob/ master/ nova/openstack/ common/ periodic_ task.py# L175 /github. com/openstack/ nova/blob/ master/ nova/openstack/ common/ periodic_ task.py# L190
https:/
Since _heal_instance_ info_cache( ) doesn't pass an interval into its periodic_task decorator it has no direct control over how often it will be called - and hence it can be called more frequently than the minimum interval set by another period task.
Currently only the following period tasks pass their required polling interval into the decorator:
_poll_shelved_ instances running_ deleted_ instances cache_manager_ pass deletes
_sync_power_states
_cleanup_
_run_image_
_run_pending_