Remove old backups with freezer-scheduler doesn't work

Bug #1681617 reported by jiaopengju
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Backup/Restore and DR (Freezer)
Fix Released
Medium
jiaopengju

Bug Description

Steps to reproduce the error.
1. Create a new job which contains 'admin action', job file content as below:
{
    "job_actions":
        [
        {"freezer_action": {
        "action" : "admin",
        "remove_older_than":1,
        "container" : "volumebackupcontainer1",
        "backup_name" : "job_protect_vol_cinder"
        }}],
        "description":"job_protect_vol_cinder"
    }

2. Wait until the job being scheduled.
3. The job will fail withe error info:
2017-04-10 22:09:14.090 30697 INFO freezer.job [-] Validating args for the admin job.
2017-04-10 22:09:14.091 30697 INFO freezer.main [-] Job execution Started at: 2017-04-10 22:09:14
2017-04-10 22:09:14.091 30697 ERROR freezer.main [-] unsupported type for timedelta days component: str
2017-04-10 22:09:14.091 30697 ERROR freezer.main Traceback (most recent call last):
2017-04-10 22:09:14.091 30697 ERROR freezer.main File "/opt/stack/freezer/freezer/main.py", line 217, in main
2017-04-10 22:09:14.091 30697 ERROR freezer.main freezer_main(backup_args)
2017-04-10 22:09:14.091 30697 ERROR freezer.main File "/opt/stack/freezer/freezer/main.py", line 114, in freezer_main
2017-04-10 22:09:14.091 30697 ERROR freezer.main return run_job(backup_args, storage)
2017-04-10 22:09:14.091 30697 ERROR freezer.main File "/opt/stack/freezer/freezer/main.py", line 127, in run_job
2017-04-10 22:09:14.091 30697 ERROR freezer.main response = freezer_job.execute()
2017-04-10 22:09:14.091 30697 ERROR freezer.main File "/opt/stack/freezer/freezer/job.py", line 418, in execute
2017-04-10 22:09:14.091 30697 ERROR freezer.main datetime.timedelta(days=self.conf.remove_older_than)
2017-04-10 22:09:14.091 30697 ERROR freezer.main TypeError: unsupported type for timedelta days component: str
2017-04-10 22:09:14.091 30697 ERROR freezer.main
2017-04-10 22:09:14.091 30697 CRITICAL freezer.main [-] End freezer agent process unsuccessfully
2017-04-10 22:09:14.092 30697 CRITICAL freezer.main [-] Critical Error: unsupported type for timedelta days component: str

This bug should be fixed.

Tags: freezer
jiaopengju (pj-jiao)
Changed in freezer:
assignee: nobody → jiaopengju (pj-jiao)
jiaopengju (pj-jiao)
Changed in freezer:
status: New → In Progress
jiaopengju (pj-jiao)
summary: - Remove old backups doesn't work
+ Remove old backups with freezer-scheduler doesn't work
Saad Zaher (szaher)
Changed in freezer:
milestone: none → pike-2
importance: Undecided → Low
importance: Low → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to freezer (master)

Reviewed: https://review.openstack.org/455495
Committed: https://git.openstack.org/cgit/openstack/freezer/commit/?id=c2c276dc7cfd5c0dc7b2b275192c3f9fa82bf9a3
Submitter: Jenkins
Branch: master

commit c2c276dc7cfd5c0dc7b2b275192c3f9fa82bf9a3
Author: Pengju Jiao <email address hidden>
Date: Tue Apr 11 10:21:01 2017 +0800

    Fix remove old backups error

    Currently, remove old backups with created
    job that contains admin action will failed
    with error info 'Critical Error: unsupported
    type for timedelta days component: str'. This
    patch will fix it.

    Change-Id: I057b2623be21f97b926e16c3594aea6b9ebfc297
    Closes-Bug: #1681617

Changed in freezer:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/freezer 5.0.0.0b2

This issue was fixed in the openstack/freezer 5.0.0.0b2 development milestone.

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.