Bug 2059344 - no permission to set max_sectors_kb
Summary: no permission to set max_sectors_kb
Keywords:
Status: MODIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: sanlock
Version: 9.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-28 20:05 UTC by David Teigland
Modified: 2023-08-10 15:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-114050 0 None None None 2022-02-28 20:13:17 UTC

Description David Teigland 2022-02-28 20:05:58 UTC
Description of problem:

sanlock attempts to set max_sectors_kb to match the lease size and optimize io's to disk:

05cb313 sanlock: allow setting max_sectors_kb
https://pagure.io/sanlock/c/05cb3135589742cec05e41563eae54fb26079656?branch=master

bf8058b sanlock: use default max_sectors_kb 1024
https://pagure.io/sanlock/c/bf8058be781e23a8d2c2b99581faaf46a8d258b5?branch=master


To do this, sanlock needs to read and write /sys/dev/block/<major>:<minor>/queue/max_sectors_kb

but the sanlock:sanlock user:group does not have permission to write this file.

sanlock log_dump will show the following errors:

2022-02-28 12:43:33 4130680 [3078770]: cmd_add_lockspace 2,13 LS:1:/dev/mm/main:0 flags 0 timeout 0
2022-02-28 12:43:33 4130680 [3078770]: s1 lockspace LS:1:/dev/mm/main:0
2022-02-28 12:43:33 4130680 [3078815]: s1 set_lockspace_max_sectors_kb hw_kb 32767 setting 1024
2022-02-28 12:43:33 4130680 [3078815]: write_sysfs_size open error 13 /sys/dev/block/253:6/queue/max_sectors_kb
2022-02-28 12:43:33 4130680 [3078815]: set_max_sectors_kb write 1024 error -1 /dev/mm/main
2022-02-28 12:43:33 4130680 [3078815]: s1 set_lockspace_max_sectors_kb hw_kb 32767 set 1024 error -1


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 David Teigland 2022-08-15 15:47:52 UTC
too late to get QA approval for 9.1


Note You need to log in before you can comment on or make changes to this bug.