Bug 2159301

Summary: mds/PurgeQueue: don't consider filer_max_purge_ops when _calculate_ops
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Dhairya Parmar <dparmar>
Component: CephFSAssignee: Dhairya Parmar <dparmar>
Status: CLOSED ERRATA QA Contact: Hemanth Kumar <hyelloji>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.2CC: cephqe-warriors, hyelloji, tserlin, vdas, vereddy, vshankar
Target Milestone: ---Flags: hyelloji: needinfo+
Target Release: 5.3z1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-16.2.10-107.el8cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2159307 (view as bug list) Environment:
Last Closed: 2023-02-28 10:06:24 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: 2159307    

Description Dhairya Parmar 2023-01-09 11:16:45 UTC
Description of problem:
_calculate_ops relying on a config which can be modified on the fly will cause a bug. e.g.

A file has 20 objects and filer_max_purge_ops config was 10.
calling PurgeQueue::_execute_item and _calculate_ops returns 10, so ops_in_flight add 10.
adjust filer_max_purge_ops to 20 on the fly
calling PurgeQueue::_execute_item_complete and _calculate_ops returns 20, so ops_in_flight dec 20.
since ops_in_flight is uint64, this cause an overflow which makes ops_in_flight far more greater than max_purge_ops and can't go back to a reasonable value.
filer_max_purge_ops will still work when _do_purge_range, so it's ok to ignore it here.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 RHEL Program Management 2023-01-09 11:16:54 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 9 errata-xmlrpc 2023-02-28 10:06:24 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 (Important: Red Hat Ceph Storage 5.3 Bug fix and security 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-2023:0980