[LU-15625] set_param -P must not be used for root squash Created: 07/Mar/22  Updated: 21/Aug/22  Resolved: 27/Jun/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.16.0, Lustre 2.15.2

Type: Bug Priority: Minor
Reporter: Sebastien Buisson Assignee: Sebastien Buisson
Resolution: Fixed Votes: 0
Labels: sec

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Only lctl conf_param must be used to set root squash parameters. If lctl set_param -P is used, the value is set only on server side permanently, and any other value set via conf_param is ignored. Plus this value is not forwarded to client side.



 Comments   
Comment by Gerrit Updater [ 07/Mar/22 ]

"Sebastien Buisson <sbuisson@ddn.com>" uploaded a new patch: https://review.whamcloud.com/46728
Subject: LU-15625 sec: set_param -P must not be used for root squash
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: fa37f40d246748937f8f0bf459c34b7c72e75c44

Comment by Andreas Dilger [ 07/Mar/22 ]

It isn't really clear why "set_param -P" is not working in this case? Is there a different path or parameter name in use on the client compared to the server?

It looks like that is the root of the problem:

# lctl list_param -R "*" | grep squash
llite.myth-ffff90f574676000.nosquash_nids
llite.myth-ffff90f574676000.root_squash
mdt.myth-MDT0000.nosquash_nids
mdt.myth-MDT0000.root_squash
nodemap.default.squash_gid
nodemap.default.squash_uid

It looks like the squash parameter needs to be set like:

# lctl set_param -P *.myth*.root_squash=x:y
# lctl set_param -P *.myth*.nodquash_nids=xxx 

So that it includes the fsname but not the device name, so that it applies on both the client and server.

It would really be better for usability if "set_param -P" just worked properly in this case, since users are very unlikely to read the manual. One option would be for the config llog parsing to detect the case of mdt.*.root_squash and replaced it with llite.* so that it "just worked".

Comment by Sebastien Buisson [ 08/Mar/22 ]

OK, after discussion with Andreas, approach taken in https://review.whamcloud.com/46728 is not the best way to go.

The patch for this problem should consist in fixing set_param -P for root_squash and nosquash_nids parameters, so that this setting is correctly propagated to clients, and we do not end up with clients with inconsistent or no values at all for these parameters.

Comment by Gerrit Updater [ 08/Mar/22 ]

"Sebastien Buisson <sbuisson@ddn.com>" uploaded a new patch: https://review.whamcloud.com/46739
Subject: LU-15625 sec: fix set_param -P for root squash
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9dcb2e477ad58f35b9d63e689350e0fb927a0168

Comment by Gerrit Updater [ 27/Jun/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/46739/
Subject: LU-15625 sec: fix set_param -P for root squash
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 7b8449e8f9ed310376a191ec8dfa2f1cb6233377

Comment by Gerrit Updater [ 27/Jun/22 ]

"Sebastien Buisson <sbuisson@ddn.com>" uploaded a new patch: https://review.whamcloud.com/47792
Subject: LU-15625 sec: fix set_param -P for root squash
Project: fs/lustre-release
Branch: b2_15
Current Patch Set: 1
Commit: 6db1730e59e574bd5e6cb5537248eaf9e760322c

Comment by Peter Jones [ 27/Jun/22 ]

Landed for 2.16

Comment by Gerrit Updater [ 20/Aug/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/47792/
Subject: LU-15625 sec: fix set_param -P for root squash
Project: fs/lustre-release
Branch: b2_15
Current Patch Set:
Commit: 8ea47747c9fcf3ba1d0bca8456f2ad978f8dd2d5

Generated at Sat Feb 10 03:19:55 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.