Confusing behavior of default `image_cache_manager_interval` and `instance_delete_interval`

Bug #1188226 reported by Riccardo Murri
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)

Bug Description

In all periodic tasks, an "interval" setting of 0 means that the task is executed at every run of the scheduler.
Well, all except `image_cache_manager_interval`, where a setting of 0 means "disabled"!

Excerpt from Folsom's `nova/compute/` (lines 2926--2932):

    def _run_image_cache_manager_pass(self, context):
        """Run a single pass of the image cache manager."""

        if FLAGS.image_cache_manager_interval == 0:
        # ...

What is even more confusing is that the periodic command scheduler will log "Running periodic task ComputeManager._run_image_cache_manager_pass" *before* entering the `_run_image_cache_manager_pass` method, so, according to the logs, the task is executing normally...

Please make `image_cache_manager_interval` behave like the other intervals, or -at least- log a line to the extent that the task is disabled.

Running Folsom's python-nova on Ubuntu 12.04:

# dpkg -l python-nova
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
ii python-nova 2012.2.1+stable-20121212-a99a802e OpenStack Compute Python libraries

tags: added: compute
Changed in nova:
assignee: nobody → Alexei Kornienko (alexei-kornienko)
status: New → In Progress
Revision history for this message
Matt Fischer (mfisch) wrote :

This also applies to the delete task periodic job:

if CONF.instance_delete_interval == 0:

summary: - Confusing behavior of default `image_cache_manager_interval`
+ Confusing behavior of default `image_cache_manager_interval` and
+ `instance_delete_interval`
Changed in nova:
importance: Undecided → Medium
Changed in nova:
assignee: Alexei Kornienko (alexei-kornienko) → Davanum Srinivas (DIMS) (dims-v)
Changed in nova:
assignee: Davanum Srinivas (DIMS) (dims-v) → nobody
Changed in nova:
status: In Progress → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Submitter: Jenkins
Branch: master

commit c1298f13e10c9d6b4d7c11968ee453c64c556006
Author: Davanum Srinivas <email address hidden>
Date: Sat Sep 6 22:28:21 2014 -0400

    Add warning to periodic_task with interval 0

    In Ia227f4c4e69ecf361ab02d1d17a3010303650104, warnings were
    added for several options but instance_delete_interval was
    left out by mistake.

    Closes-Bug: #1188226
    Change-Id: I20b396d664e40252743cac4f2a49f4f34882b32f

Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers