[LU-7437] "lctl list_param -R" can't list the parameters recursively Created: 17/Nov/15  Updated: 25/Apr/16  Resolved: 25/Apr/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.8.0
Fix Version/s: Lustre 2.8.0

Type: Bug Priority: Critical
Reporter: Emoly Liu Assignee: Emoly Liu
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-5030 "lctl {get,set}_param" should also ch... Resolved
is related to LU-7796 "lctl set_param jobid_var" should ret... Resolved
is related to LU-7802 set_param lru_size fails with 'error:... Resolved
is related to LU-8064 Minor fix in param_display() Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

When running "lctl list_param -R '*', it only shows /proc/{fs,sys}/{lustre,lnet}/ *, not recursively.

[root@centos6-1 utils]# ./lctl list_param -R '*'
devices
echo_client
error: list_param: /proc/fs/lustre/echo_client/*: Found no match
fld
error: list_param: /proc/fs/lustre/fld/*: Found no match
health_check
jobid_name
jobid_var
ldlm
error: list_param: /proc/fs/lustre/ldlm/*: Found no match
llite
error: list_param: /proc/fs/lustre/llite/*: Found no match
lmv
...

I will submit a patch later.



 Comments   
Comment by Alex Zhuravlev [ 17/Nov/15 ]

please, try with http://review.whamcloud.com/#/c/17135/

Comment by Emoly Liu [ 17/Nov/15 ]

Alex, this issue happens to list_param. It's caused by calling lprocfs_param_pattern() inside listparam_display(), which adds prefix "/proc/{fs,sys}/{lustre,lnet}" each time, as follows

listparam_display (popt=0x7fffffffe350, pattern=0x7fffffffd2b0 "/proc/fs/lustre/echo_client/*") at lustre_cfg.c:823
823		if (rc < 0)
(gdb) n
822		rc = lprocfs_param_pattern(pattern, filename, sizeof(filename));
(gdb) n
823		if (rc < 0)
(gdb) p pattern
$13 = 0x7fffffffd2b0 "/proc/fs/lustre/echo_client/*"
(gdb) p filename
$14 = "/proc/{fs,sys}/{lnet,lustre}//proc/fs/lustre/echo_client/*", '\000' <repeats 526 times>"\200, \356\230c1\000\000\000(\200\000\000\000\000\000\000\200\356\230c1\000\000\000&\000\000\000\000\000\000\000\t\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\200\002", '\000' <repeats 30 times>, "&\000\000\000\001\000\000\000\\\000\000\000|\000\000\000w\000\000\000n\000\000\000p\305\377\377\377\177\000\000\220\204e\000\000\000\000\000`\002\000\000\000\000\000\000\200\356\230c1\000\000\000P\211e\000\000\000\000\000\200\206e\000\000\000\000\000\360\001\000\000\000\000\000\000`\262gc1", '\000' <repeats 11 times>"\360"...
(gdb) quit

This issue will also happen to get_param if the patch http://review.whamcloud.com/#/c/17081/5/lustre/utils/lustre_cfg.c is applied.

Comment by Alex Zhuravlev [ 17/Nov/15 ]

thanks for trying.

Comment by Gerrit Updater [ 17/Nov/15 ]

Emoly Liu (emoly.liu@intel.com) uploaded a new patch: http://review.whamcloud.com/17223
Subject: LU-7437 lctl: list_param -R can't work correctly
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: cfcf0f168c1c9b87e0f85c46ca44bf71c27f4b12

Comment by Gerrit Updater [ 04/Dec/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/17223/
Subject: LU-7437 lctl: list_param -R can't work correctly
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 2d1103558c8c26030df592589f3e8ebc299fbe48

Comment by Joseph Gmitter (Inactive) [ 04/Dec/15 ]

Landed for 2.8

Comment by Andreas Dilger [ 06/Feb/16 ]

Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: http://review.whamcloud.com/18338
Subject: LU-7437 utils: continue on errors in lctl {get,set}_param
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 38b6939a82949bc351db1098f4a0a26c3196a432

Comment by Andreas Dilger [ 06/Feb/16 ]

Reopening this ticket because the patch http://review.whamcloud.com/17223/ broke handing of lctl set_param if there are errors during parameter processing. The command should continue to process all parameters given even if some parameters failed during processing. This was worsened by the reorganization in LU-5030 to use cfs_get_paths().

Comment by James A Simmons [ 06/Feb/16 ]

Yes I thought exiting on error for set_param was the normal behavior which I saw when running lctl set_param.

Comment by Saurabh Tandan (Inactive) [ 10/Feb/16 ]

Another instance found for Full tag 2.7.66 -EL7.1 Server/SLES11 SP3 Client, build# 3314
https://testing.hpdd.intel.com/test_sets/6f89f660-ca7b-11e5-9609-5254006e85c2

Comment by Gerrit Updater [ 15/Feb/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/18338/
Subject: LU-7437 utils: continue on errors in lctl

{get,set}

_param
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 22856f4e5e2a84be332b6c70f039c47f24cf7b44

Comment by Peter Jones [ 15/Feb/16 ]

Landed for 2.8

Comment by Gerrit Updater [ 25/Apr/16 ]

Emoly Liu (emoly.liu@intel.com) uploaded a new patch: http://review.whamcloud.com/19759
Subject: LU-7437 lctl: fix a typo in lustre_cfg.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 56222d13f95bd9ce00d7d7a6fe7be579a4966520

Comment by Peter Jones [ 25/Apr/16 ]

Emoly

Given that the first fix was landed for 2.8, which is now GA, it would probably be better to open a new ticket to track this correction. I find that it causes confusion if multiple fixes that are tracked by the same JIRA reference span release boundaries.

Peter

Comment by Emoly Liu [ 25/Apr/16 ]

OK, I will create a new ticket to submit this patch.

Generated at Sat Feb 10 02:08:54 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.