Whamcloud - gitweb
LU-3789 mgs: Add deprecation warning for "lctl conf_param" 36/7436/3
authorArtem Blagodarenko <artem_blagodarenko@xyratex.com>
Fri, 23 Aug 2013 12:53:45 +0000 (16:53 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 3 Sep 2013 06:07:15 +0000 (06:07 +0000)
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 <artem_blagodarenko@xyratex.com>
Change-Id: I37479a333869de1d10b74b623bd4d921774664e8
Reviewed-on: http://review.whamcloud.com/7436
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
lustre/utils/lctl.c
lustre/utils/lustre_cfg.c

index 4a95edf..fa1063a 100644 (file)
@@ -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=<secs>\n"},
          "abort recovery on a restarting MDT or OST device\n"},
         {"set_timeout", jt_lcfg_set_timeout, 0,
          "usage: conf_param obd_timeout=<secs>\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] <target.keyword=val>\n"
          "  -d  Remove the permanent setting."},
         {"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] <target.keyword=val>\n"
          "  -d  Remove the permanent setting."},
+#endif
         {"local_param", jt_lcfg_param, 0, "set a temporary, local param\n"
          "usage: local_param <target.keyword=val>\n"},
         {"get_param", jt_lcfg_getparam, 0, "get the Lustre or LNET parameter\n"
         {"local_param", jt_lcfg_param, 0, "set a temporary, local param\n"
          "usage: local_param <target.keyword=val>\n"},
         {"get_param", jt_lcfg_getparam, 0, "get the Lustre or LNET parameter\n"
index 016ae70..1c9ed42 100644 (file)
@@ -582,6 +582,11 @@ int jt_lcfg_mgsparam(int argc, char **argv)
         struct lustre_cfg *lcfg;
         char *buf = NULL;
 
         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;
         /* mgs_setparam processes only lctl buf #1 */
         if ((argc > 3) || (argc <= 1))
                 return CMD_HELP;