From: Artem Blagodarenko Date: Fri, 23 Aug 2013 12:53:45 +0000 (+0400) Subject: LU-3789 mgs: Add deprecation warning for "lctl conf_param" X-Git-Tag: 2.4.92~5 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=b50f73018c25d039bf9952728c35985be9a4c1d4;ds=sidebyside LU-3789 mgs: Add deprecation warning for "lctl conf_param" lctl set_param -P has been added with LU-3155. Old mechanism (lctl conf_param) should be deprecated. This patch adds warnings since 2.7.53 and disable lctl set_param option since 3.0.53 Xyratex-bug-id: MRP-272 Signed-off-by: Artem Blagodarenko Change-Id: I37479a333869de1d10b74b623bd4d921774664e8 Reviewed-on: http://review.whamcloud.com/7436 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Emoly Liu --- diff --git a/lustre/utils/lctl.c b/lustre/utils/lctl.c index 4a95edf..fa1063a 100644 --- a/lustre/utils/lctl.c +++ b/lustre/utils/lctl.c @@ -134,10 +134,14 @@ command_t cmdlist[] = { "abort recovery on a restarting MDT or OST device\n"}, {"set_timeout", jt_lcfg_set_timeout, 0, "usage: conf_param obd_timeout=\n"}, +#if LUSTRE_VERSION >= OBD_OCD_VERSION(3,0,53,0) +#warning "remove conf_param option" +#else {"conf_param", jt_lcfg_mgsparam, 0,"set a permanent config parameter.\n" "This command must be run on the MGS node\n" "usage: conf_param [-d] \n" " -d Remove the permanent setting."}, +#endif {"local_param", jt_lcfg_param, 0, "set a temporary, local param\n" "usage: local_param \n"}, {"get_param", jt_lcfg_getparam, 0, "get the Lustre or LNET parameter\n" diff --git a/lustre/utils/lustre_cfg.c b/lustre/utils/lustre_cfg.c index 016ae70..1c9ed42 100644 --- a/lustre/utils/lustre_cfg.c +++ b/lustre/utils/lustre_cfg.c @@ -582,6 +582,11 @@ int jt_lcfg_mgsparam(int argc, char **argv) struct lustre_cfg *lcfg; char *buf = NULL; +#if LUSTRE_VERSION >= OBD_OCD_VERSION(2,7,53,0) + fprintf(stderr, "warning: 'lctl conf_param' is deprecated, " + "use 'lctl set_param -P' instead\n"); +#endif + /* mgs_setparam processes only lctl buf #1 */ if ((argc > 3) || (argc <= 1)) return CMD_HELP;