Bug 2272647

Summary: [CephFS - Snap Scheduler UI] - Snap Schedule delete fails with error 'Retention for m:3 was not set for <path> can't remove'
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: sumr
Component: Ceph-DashboardAssignee: Ivo Almeida <ialmeida>
Status: CLOSED ERRATA QA Contact: sumr
Severity: high Docs Contact: Akash Raj <akraj>
Priority: unspecified    
Version: 7.1CC: akraj, anbehl, ceph-eng-bugs, cephqe-warriors, tserlin
Target Milestone: ---Keywords: Regression
Target Release: 7.1   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ceph-18.2.1-138.el9cp Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-06-13 14:31:01 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:
Bug Depends On:    
Bug Blocks: 2267614, 2298578, 2298579    

Description sumr 2024-04-02 11:54:58 UTC
Created attachment 2024738 [details]
last snap schedule delete fails

Description of problem:
when multiple schedules defined for a path and with retention policy having monthly interval, deleting of schedules gets stuck for the last one. Even upon many attempts, delete doesn't succeed from Dashboard, however delete is allowed from cli.

Error in Dashboard mentions "Failed to remove Retention policy for path <> Retention for m:3 was not set for <path> can't remove"

There is a fix mentioned in MR: https://gitlab.cee.redhat.com/ceph/ceph/-/merge_requests/537

"Added call to remove retention policies when removing a snap schedule
in case it is the last one with same path"

The scenario I have been trying is very similar to workflow mentioned above.So guessing the change in this MR is causing the issue.

So adding the Regression keyword, please update/remove if not appropriate.

Version-Release number of selected component (if applicable): 18.2.1-105.el9cp


How reproducible: consistently


Steps to Reproduce:
1. Create 3 snap schedules for same path, with schedule as Monthly and hourly
2. Add relevant retention policies mentioning retention period for Monthly and hourly intervals
3. Verify schedules are created as expected.
4. Delete the schedules in an order.
5. Verify if last schedule in list for same path can get deleted in Dashboard

Actual results: Last schedule deletion fails with error described above.
Attached screenshot has error details.


Expected results: Lash schedule deletion should have succeeded.


Additional info: When issue is hit, schedule deletion from cli succeeds. May be because in CLI, we have a cmd syntax to delete schedule by specifying path only.

Comment 11 errata-xmlrpc 2024-06-13 14:31:01 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 (Critical: Red Hat Ceph Storage 7.1 security, enhancements, and 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/RHSA-2024:3925