Whamcloud - gitweb
LU-888 lctl: remove perilous lctl {get,set,list}_param behavior.
authorRichard Henwood <rhenwood@whamcloud.com>
Sat, 3 Dec 2011 02:44:45 +0000 (21:44 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 4 Jan 2012 18:35:10 +0000 (13:35 -0500)
commit51ed079112c9a9eeac37eaf680637a4d04dd3cc9
tree9abdf88a37eb36c709d2d94016073c3dd813be82
parent78b38388cc3aa8f2f9ed367bc812165f24cbdb6a
LU-888 lctl: remove perilous lctl {get,set,list}_param behavior.

This patch stops the {get,set)_param from potentially reading and
writing to file in the current working directory. Now lctl
{get,set,list}_param visits /proc/{fs,sys}/{lnet,lustre} for
parameter values. Specifying a file path to {get,set,list}_param
is deprecated behavoir.

Using a path with lctl {get,set,list}_param fails if the path does
not begin with '/proc/'. If the path begins with '/proc/' a warning
is printed the command executes using the given path.

A new helper function lprocfs_param_pattern is introduced to
provide checking and constructing the proc path.

Test suite has been searched for {get,set,list}_param lctl calls.
All specified parameters have been checked to ensure they are
not using the deprecated path interface.

lctl man page is updated to remove ambiguity around using paths
to specifiy parameters.

Signed-off-by: Richard Henwood <rhenwood@whamcloud.com>
Change-Id: I39e355b28fb1337f5b3a53f9e7265f4e969ddd2d
Reviewed-on: http://review.whamcloud.com/1765
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John Hammond <jhammond@tacc.utexas.edu>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/doc/lctl.8
lustre/tests/sanity.sh
lustre/utils/lustre_cfg.c