Confusing behavior of default `image_cache_manager_interval` and `instance_delete_interval`

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

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/manager.py` (lines 2926--2932):

    @manager.periodic_task(
        ticks_between_runs=FLAGS.image_cache_manager_interval)
    def _run_image_cache_manager_pass(self, context):
        """Run a single pass of the image cache manager."""

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

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
Desired=Unknown/Install/Remove/Purge/Hold
| 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: compute
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:
        return

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)

Reviewed: https://review.openstack.org/119585
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c1298f13e10c9d6b4d7c11968ee453c64c556006
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.