[LU-11988] Some lctl *_param values only readable by root Created: 21/Feb/19 Updated: 25/Feb/19 Resolved: 25/Feb/19 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.12.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Christopher Morrone | Assignee: | Patrick Farrell (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | llnl | ||
| Issue Links: |
|
||||||||||||||||
| Severity: | 3 | ||||||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||||||
| Description |
|
Some lustre stats that used to be in /proc now reside in debugfs. This seems all for the better, but it looks like the lctl [get|set|list]_param commands were not updated to look for the values in the new location. Since the lctl *_param functions are meant to make these kinds of moves transparent to users, we think it is important to have lctl look in debugfs as well. For example, in going from 2.10 to 2.12, we noticed that 'llite.*.stats' seem to have disappeared (but really are just hiding in debugfs): $ lctl get_param 'llite.*.stats' error: get_param: param_path 'llite/*/stats': No such file or directory |
| Comments |
| Comment by Patrick Farrell (Inactive) [ 21/Feb/19 ] |
|
Hmm, it does look there, and has since well before 2.12. lctl finds the llite stats just fine on my node here, and it's definitely in debugfs. Let's check a few things. cat /proc/version mount -t lustre Verify the file is really there in debugfs - maybe debugfs isn't mounted or Lustre isn't mounted or something else is weird...? Show the exact path in debugfs, in case something odd is up with that...? Then, strace -v your lctl get_param command, and let's see if we learn anything else.
BTW, this is the patch that added it:
With the move of the upstream client to sysfs the Change-Id: I78788f41955073e1e48126103ef2aec13d64812b |
| Comment by Patrick Farrell (Inactive) [ 21/Feb/19 ] |
|
We do assume a mount point for debugfs: {/sys/\{fs,kernel/debug}/{lnet,lustre}/, |
| Comment by James A Simmons [ 21/Feb/19 ] |
|
Are you attempting to run as a non-root user? By default debugfs only allows root access. |
| Comment by Christopher Morrone [ 21/Feb/19 ] |
|
Doh! Yeah, it is just a permissions problem, my bad. What is the approach to address this from Lustre folks so far? I assume that debugfs is probably root-only access for a reason, but there are things in there that we want to allow non-root processes to access. Also, if lctl had returned a permissions error rather than a not-found error, that might have made it more obvious what I was looking for. |
| Comment by James A Simmons [ 25/Feb/19 ] |
|
To let you know I'm work on a solution to resolve this (LU-11850). Its up to Peter if its okay to backport to 2.12 LTS. |
| Comment by Christopher Morrone [ 25/Feb/19 ] |
|
Resolving as duplicate of LU-11850. |