backup removal feature is broken

Bug #1599592 reported by Pierre-Arthur MATHIEU
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Backup/Restore and DR (Freezer)
In Progress
High
Memo Garcia

Bug Description

It seems like the backup removal feature of freezer is broken.
That concerns remove-older-than and remove-from-date option when passed with or without --action admin.

this was only tested using storage swift.

remove-older-than
{code}
root@padawan-ccp-c1-m1-mgmt:/home/stack# swift list freezer_plop | grep padawan-ccp-c1-m1-mgmt
padawan-ccp-c1-m1-mgmt_plip_1467649589_0
padawan-ccp-c1-m1-mgmt_plip_1467671190_0
padawan-ccp-c1-m1-mgmt_plip_1467692790_0
padawan-ccp-c1-m1-mgmt_plip_1467710785_0
padawan-ccp-c1-m1-mgmt_plip_1467714390_0
padawan-ccp-c1-m1-mgmt_plip_1467735990_0
padawan-ccp-c1-m1-mgmt_plip_1467741493_0
padawan-ccp-c1-m1-mgmt_plip_1467743741_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467649589_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467671190_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467692790_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467710785_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467714390_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467735990_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467741493_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467743741_0
root@padawan-ccp-c1-m1-mgmt:/home/stack# freezer-agent --action admin --remove-older-than 1 --container freezer_plop --backup-name plip
Option "remove_older_than" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future.
[*] Critical Error: Backup instance has no attribute 'rstrip'
{code}

Remove-older-than during backup
{code}
root@padawan-ccp-c1-m1-mgmt:/home/stack# cat action.ini
[default]
action = backup
path_to_backup = /etc/
remove_older_than = 1
backup_name = plip
container = freezer_plop
no_incremental = true
snapshot = true
root@padawan-ccp-c1-m1-mgmt:/home/stack# freeazer-agent --config action.ini
bash: freeazer-agent: command not found
root@padawan-ccp-c1-m1-mgmt:/home/stack# freezer-agent --config action.ini
root@padawan-ccp-c1-m1-mgmt:/home/stack# swift list freezer_plop | grep padawan-ccp-c1-m1-mgmt
padawan-ccp-c1-m1-mgmt_plip_1467649589_0
padawan-ccp-c1-m1-mgmt_plip_1467671190_0
padawan-ccp-c1-m1-mgmt_plip_1467692790_0
padawan-ccp-c1-m1-mgmt_plip_1467710785_0
padawan-ccp-c1-m1-mgmt_plip_1467714390_0
padawan-ccp-c1-m1-mgmt_plip_1467735990_0
padawan-ccp-c1-m1-mgmt_plip_1467741493_0
padawan-ccp-c1-m1-mgmt_plip_1467743741_0
padawan-ccp-c1-m1-mgmt_plip_1467744713_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467649589_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467671190_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467692790_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467710785_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467714390_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467735990_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467741493_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467743741_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467744713_0
{code}

Remove-from-date
{code}
root@padawan-ccp-c1-m1-mgmt:/home/stack# freezer-agent --action admin --remove-from-date 2016-07-05T18:00:00 --container freezer_plop
root@padawan-ccp-c1-m1-mgmt:/home/stack# swift list freezer_plop | grep padawan-ccp-c1-m1-mgmt
padawan-ccp-c1-m1-mgmt_plip_1467649589_0
padawan-ccp-c1-m1-mgmt_plip_1467671190_0
padawan-ccp-c1-m1-mgmt_plip_1467692790_0
padawan-ccp-c1-m1-mgmt_plip_1467710785_0
padawan-ccp-c1-m1-mgmt_plip_1467714390_0
padawan-ccp-c1-m1-mgmt_plip_1467735990_0
padawan-ccp-c1-m1-mgmt_plip_1467741493_0
padawan-ccp-c1-m1-mgmt_plip_1467743741_0
padawan-ccp-c1-m1-mgmt_plip_1467744713_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467649589_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467671190_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467692790_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467710785_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467714390_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467735990_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467741493_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467743741_0
tar_metadata_padawan-ccp-c1-m1-mgmt_plip_1467744713_0

{code}

Changed in freezer:
status: New → Triaged
assignee: nobody → Memo Garcia (sirmemogarcia)
importance: Undecided → High
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/340307

Changed in freezer:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to freezer (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/360644

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

Reviewed: https://review.openstack.org/360644
Committed: https://git.openstack.org/cgit/openstack/freezer/commit/?id=4ef18182e0c973ca200f5d6fdc2f37a4c20214b2
Submitter: Jenkins
Branch: stable/mitaka

commit 4ef18182e0c973ca200f5d6fdc2f37a4c20214b2
Author: Memo Garcia <email address hidden>
Date: Mon Jul 11 12:19:02 2016 +0100

    Fix Backup removal is not working

    Argument --remove-before-date added
    Argument --remove-from-date deprecated in favor of --remove-before-date
    Argument --remove-before-date now accepts ISO datetime and timestamp

    Closes-bug: 1599592
    Change-Id: I5a2c535ca4bf837cd2dc63e9e664ffc979e516bd

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to freezer (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/384976

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

Reviewed: https://review.openstack.org/384976
Committed: https://git.openstack.org/cgit/openstack/freezer/commit/?id=b5c764032d87be9f7308abfa2b235ede1bae3942
Submitter: Jenkins
Branch: stable/liberty

commit b5c764032d87be9f7308abfa2b235ede1bae3942
Author: Memo Garcia <email address hidden>
Date: Mon Jul 11 12:19:02 2016 +0100

    Fix Backup removal is not working

    Argument --remove-before-date added
    Argument --remove-from-date deprecated in favor of --remove-before-date
    Argument --remove-before-date now accepts ISO datetime and timestamp

    Closes-bug: 1599592

    Conflicts:
     README.rst
     freezer/common/config.py
     freezer/job.py
     freezer/main.py
     freezer/storage/base.py
     freezer/utils.py

    (cherry-picked from: I5a2c535ca4bf837cd2dc63e9e664ffc979e516bd)

    Change-Id: I260fa52f404eef067d6bd0629de3690af7c37653

tags: added: in-stable-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on freezer (master)

Change abandoned by Memo Garcia (<email address hidden>) on branch: master
Review: https://review.openstack.org/340307

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.