Bug 1263699

Summary: dnf-plugin-snapper does not set cleanup type for snapshots
Product: [Fedora] Fedora Reporter: Daniel Miranda <danielkza2>
Component: dnf-plugins-extrasAssignee: Igor Gnatenko <ignatenko>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 22CC: ignatenko, jkadlcik, jsilhan, mluscon, packaging-team-maint, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 20:13:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daniel Miranda 2015-09-16 12:46:25 UTC
Description of problem:

The Snapper plugin for DNF creates snapshots with an empty cleanup parameter. That means the snapshots will never be automatically deleted, and will accumulate. Their disk usage will increase quickly whenever there are large package updates, since a previous version of all the changed files will be kept indefinitely.

Version-Release number of selected component (if applicable):

python-dnf-plugins-extras-snapper.noarch 0.0.9-1.fc22

How reproducible:

Always

Steps to Reproduce:
1. Install the snapper plugin
2. Perform any packaging operation with DNF
3. Do `snapper list` to check the snapshots.

Actual results:

Snapshots have the cleanup type unset.

Expected results:

Snapshots have the cleanup type set to "number". It means there will be no indefinite ballooning of disk usage if the user enables the number cleanup task in the snapper configuration, but if desired, snapshots can be still kept forever if the task is disabled.

Comment 1 Igor Gnatenko 2015-09-22 17:24:00 UTC
Makes sense. Fixing.

Comment 3 Daniel Miranda 2015-09-28 01:28:05 UTC
I'm sorry if I wasn't clear with my request: what I was talking about is the cleanup *type* that is sent to snapper, that determines how the cleaner task will decide if a snapshot should be deleted or not.

Right now the plugin sends an empty string, while the "number" strategy would likely be best suited: otherwise large upgrades can quickly accumulate a lot of storage in the system.

Not creating snapshots for empty transactions is a nice feature, but not exactly what I meant.

I'll send a pull request with the change since it should be actually quite simple.

Comment 4 Mike McCune 2016-03-28 22:42:18 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 5 Fedora End Of Life 2016-07-19 20:13:59 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Daniel Miranda 2016-07-19 20:21:10 UTC
This was actually fixed in dnf-plugins-extras 0.0.11.