CONF.task.task_time_to_live doesn't work

Bug #1488360 reported by wangxiyuan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
wangxiyuan

Bug Description

Reproduce:

1.set task_time_to_live to 1 in glance-api.conf:
    task_time_to_live = 1

2. restart glance-api

3. create a import task
{
    "type":"import",
    "input":{
        "import_from":"http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img",
        "import_from_format":"",
        "image_properties":{
            "disk_format":"qcow2",
            "container_format":"bare",
            "name":"test-task"
        }
    }
}

4. wait for task success

5. show the task:
     glance task-show xxxx

Expect : updated_at and expires_at should have the difference of 1 hours.
Actual : they have the difference of 48 hours, which is the default value of task_time_to_live.

The reason is that taskflow created a task object , different from the one created by the glance api. And the task_time_to_live was set to default 48 when taskflow get it.

wangxiyuan (wangxiyuan)
Changed in glance:
assignee: nobody → wangxiyuan (wangxiyuan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/216586

Changed in glance:
status: New → In Progress
wangxiyuan (wangxiyuan)
description: updated
Changed in glance:
importance: Undecided → Medium
tags: added: liberty-rc-potential
Changed in glance:
milestone: none → liberty-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/216586
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=5c3a3bd3d2ff8229ca92c5fece2144da6e54c75f
Submitter: Jenkins
Branch: master

commit 5c3a3bd3d2ff8229ca92c5fece2144da6e54c75f
Author: wangxiyuan <email address hidden>
Date: Tue Aug 25 15:33:50 2015 +0800

    Make task_time_to_live work

    CONF.task.task_time_to_live doesn't work now. When change it's value,
    the task's properity 'expires_at' and 'updated_at' still have the
    difference of 48 hours.

    The reason is that taskflow create a new task object and doesn't use
    the task_time_to_live which glance api passed before.

    Change-Id: Iec77be56585b7fe183d9903515e25fd096a6c0b0
    Closes-bug: #1488360

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: liberty-rc1 → 11.0.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.