Bug 1323517

Summary: Discrepancy between snapper config and cron schedule
Product: Red Hat Enterprise Linux 7 Reporter: prasun.gera
Component: snapperAssignee: Ondrej Kozina <okozina>
snapper sub component: general QA Contact: Lin Li <lilin>
Status: CLOSED WONTFIX Docs Contact:
Severity: low    
Priority: low CC: agk, bgoncalv, cmarthal, jbrassow, okozina, prajnoha, zkabelac
Version: 7.2   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-16 13:38:32 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:

Description prasun.gera 2016-04-03 20:45:04 UTC
Description of problem:

The snapper hourly cronjob just creates snapshots whereas the daily one is responsible for cleanup. This makes the TIMELINE_LIMIT_HOURLY parameter in the snapper config useless since all the hourly snapshots will be kept around until the daily job is called for cleanup. In steady state, you will have ~24 snapshots irrespective of the config. 

/etc/cron.hourly/snapper:

if [ "$TIMELINE_CREATE" = "yes" ] ; then
        snapper --config=$CONFIG --quiet create --description="timeline" --cleanup-algorithm="timeline"
    fi


/etc/cron.daily/snapper:

if [ "$TIMELINE_CLEANUP" = "yes" ] ; then
        snapper --config=$CONFIG --quiet cleanup timeline
    fi



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


How reproducible:
Easy

Steps to Reproduce:
1. Set TIMELINE_LIMIT_HOURLY in /etc/snapper/configs/config_name
2.
3.

Actual results:

More snapshots than specified

Expected results:

Same number of snapshots as specified

Additional info:

Comment 3 Jakub Krysl 2019-10-02 11:45:09 UTC
Mass migration to lilin.