Bug 2227809

Summary: snap-schedule: allow retention spec to specify max number of snaps to retain
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Milind Changire <mchangir>
Component: CephFSAssignee: Milind Changire <mchangir>
Status: CLOSED ERRATA QA Contact: sumr
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.0CC: ceph-eng-bugs, cephqe-warriors, dwalveka, hyelloji, tserlin, vshankar
Target Milestone: ---Keywords: Rebase
Target Release: 7.0z2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-18.2.0-171.el9cp Doc Type: Enhancement
Doc Text:
Feature: Provide a mechanism to retain a fixed number of snapshots irrespective of the snapshot cadence. Reason: Along with daily, weekly, monthly and yearly snaps, users also need a way to mention the max number of snaps they need to retain if they feel that mds_max_snaps_per_dir (default: 50) is insufficient for their purpose. Result: Users can retain retain number of snaphosts higher than the default. The caveat is that the config item mds_max_snaps_per dir has to be appropriately configured for the MDS as well as the Manager.
Story Points: ---
Clone Of: 2227806 Environment:
Last Closed: 2024-05-07 12:09:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milind Changire 2023-07-31 14:50:06 UTC
+++ This bug was initially created as a clone of Bug #2227806 +++

Description of problem:
Along with daily, weekly, monthly and yearly snaps, users also need a way to mention the max number of snaps they need to retain if they feel that MAX_SNAPS_PER_PATH (50) is insufficient for their purpose.

eg. the new snap-schedule with the retention spec could be: /PATH 1d1m 75n

where a max of 75 snaps from the 1d1m snap-schedule will be retained. If number of snaps ('n') are not specified as the retention spec then the default of MAX_SNAPS_PER_PATH (50) should be applicable.

NOTE: the max number of snaps possible are also a function of the system-wide config named mds_max_snaps_per_dir, which currently defaults to 100

So, if the number of snaps for a path/dir that need to be created exceeds 100, then a user would first need to tweak the value for mds_max_snaps_per_dir before updating the snap-schedule retention spec beyond 100.

NOTE: Since mds_max_snaps_per_dir is a run-time system-wide spec, any change to that config will immediately affect existing snap-schedule retention specs.



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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from RHEL Program Management on 2023-07-31 20:15:26 IST ---

Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 1 RHEL Program Management 2023-07-31 14:50:22 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 15 errata-xmlrpc 2024-05-07 12:09:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat Ceph Storage 7.0 Bug Fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2024:2743