Remove old backups doesn't work with --action admin

Bug #1415865 reported by Fausto Marzi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Backup/Restore and DR (Freezer)
Fix Released
High
Fausto Marzi

Bug Description

Freezer should be able to remove the backups from within the backup execution and also by calling
directly the admin interface (--admin). Currently it is not possible to remove backups with --admin option

PoC:
root@st-gerrit:~# freezerc --action admin --container freezer_st-gerrit.cicd.useast.hpcloud.net --backup-name gerrit-db-mysql --remove-older-then 1
2015-01-29 11:48:31,432 root INFO [*] Execution Started at: 2015-01-29 11:48:31
2015-01-29 11:48:31,513 urllib3.connectionpool INFO Starting new HTTPS connection (1): region-b.geo-1.identity.hpcloudsvc.com
2015-01-29 11:48:31,709 root INFO [*] Removing object older 1 day(s)
2015-01-29 11:48:31,710 root INFO [*] Execution Finished, at: 2015-01-29 11:48:31
2015-01-29 11:48:31,710 root INFO [*] Time Elapsed: 0:00:00.278159

But the objects available in the swift container are older then 1 day.

Revision history for this message
Fausto Marzi (fausto-marzi) wrote :

Freezer currently cannot remove old backups not even if --remove-older-then is set while executing a backup.

Changed in freezer:
assignee: nobody → Fausto Marzi (fausto-marzi)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Fausto Marzi (fausto-marzi) wrote :

Fix submitted for review at:
- https://review.openstack.org/151265

Changed in freezer:
assignee: Fausto Marzi (fausto-marzi) → Fabrizio Vanni (fabrizio.vanni)
Changed in freezer:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to freezer (master)

Reviewed: https://review.openstack.org/151265
Committed: https://git.openstack.org/cgit/stackforge/freezer/commit/?id=5c060a918584e9c0f951ac9b53d55e0196b72023
Submitter: Jenkins
Branch: master

commit 5c060a918584e9c0f951ac9b53d55e0196b72023
Author: Fausto Marzi <email address hidden>
Date: Thu Jan 29 14:44:53 2015 +0000

    Fixed bug 1415865 for old backup removal

    Old backups are correctly removed, provided that
    no not-to-be-removed backup depends upon them.

    Incremental backups correctly start from level 0 when
    there is no tar_metadata available for the last backup

    Command line option --no-incremental is now incompatible
    with --max-level and with --always-level

    Add the following command which allows to specify
    a datetime for old backup removal.

      --remove-from-date YYYY-MM-DDThh:mm:ss

    Closes-Bug: #1415865
    Change-Id: Ie779ee354b67e9a1a012d28801b17dbd5cd353b6
    LAUNCHPAD: https://bugs.launchpad.net/freezer/+bug/1415865

Changed in freezer:
status: In Progress → Fix Committed
Revision history for this message
Fausto Marzi (fausto-marzi) wrote :

This bug is still present. Reopening the issue

Changed in freezer:
status: Fix Committed → In Progress
assignee: Fabrizio Vanni (fabrizio.vanni) → Fausto Marzi (fausto-marzi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to freezer (master)

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

Revision history for this message
Fausto Marzi (fausto-marzi) wrote :

Code review available at:

- https://review.openstack.org/177191

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to freezer (master)

Reviewed: https://review.openstack.org/177191
Committed: https://git.openstack.org/cgit/stackforge/freezer/commit/?id=72a6c7396ed225ea2e8aa4a2064371c7df9285a1
Submitter: Jenkins
Branch: master

commit 72a6c7396ed225ea2e8aa4a2064371c7df9285a1
Author: Fausto Marzi <email address hidden>
Date: Fri Apr 24 12:39:38 2015 +0100

    Fix bug on --remove-older-then opt

    Old backups was never removed because of the use
    of "is not" rather "!=" in the source code.

    Change-Id: I92d681d61f7eacd42410d8392f1dabeeba4e94e9
    Closes: bug 1415865

Changed in freezer:
status: In Progress → Fix Committed
Changed in freezer:
status: Fix Committed → Won't Fix
status: Won't Fix → Fix Released
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.