Bug 2059344

Summary: no permission to set max_sectors_kb
Product: Red Hat Enterprise Linux 9 Reporter: David Teigland <teigland>
Component: sanlockAssignee: David Teigland <teigland>
Status: MODIFIED --- QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: high    
Version: 9.0CC: agk, cluster-maint
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

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