summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
100c601)
Client or server should not fail to mount if it hits
a configuration parameter that it doesn't understand.
This patch fixes class_process_config() to meet
the above requirement.
The patch also improves conf-sanity test 42 to verify
that invalid sys config param should not prevent client
or server from mounting.
Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I33a6eb3c2beb3dd7425a097e8e7b5a2766852a96
Reviewed-on: http://review.whamcloud.com/5037
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
PARAM_SYS, &tmp) == 0)) {
/* Global param settings */
err = class_set_global(tmp, lcfg->lcfg_num, lcfg);
PARAM_SYS, &tmp) == 0)) {
/* Global param settings */
err = class_set_global(tmp, lcfg->lcfg_num, lcfg);
- /* Note that since LCFG_PARAM is LCFG_REQUIRED, new
- unknown globals would cause config to fail */
- if (err)
- CWARN("Ignoring unknown param %s\n", tmp);
- GOTO(out, 0);
+ /*
+ * Client or server should not fail to mount if
+ * it hits an unknown configuration parameter.
+ */
+ if (err != 0)
+ CWARN("Ignoring unknown param %s\n", tmp);
+
+ GOTO(out, err = 0);
} else if ((class_match_param(lustre_cfg_string(lcfg, 1),
PARAM_QUOTA, &tmp) == 0) &&
quota_process_config) {
} else if ((class_match_param(lustre_cfg_string(lcfg, 1),
PARAM_QUOTA, &tmp) == 0) &&
quota_process_config) {
run_test 41b "mount mds with --nosvc and --nomgs on first mount"
test_42() { #bug 14693
run_test 41b "mount mds with --nosvc and --nomgs on first mount"
test_42() { #bug 14693
- setup
- check_mount || return 2
- do_facet mgs $LCTL conf_param lustre.llite.some_wrong_param=10
- umount_client $MOUNT
- mount_client $MOUNT || return 1
- cleanup
- return 0
+ setup
+ check_mount || error "client was not mounted"
+
+ do_facet mgs $LCTL conf_param $FSNAME.llite.some_wrong_param=10
+ umount_client $MOUNT ||
+ error "unmounting client failed with invalid llite param"
+ mount_client $MOUNT ||
+ error "mounting client failed with invalid llite param"
+
+ do_facet mgs $LCTL conf_param $FSNAME.sys.some_wrong_param=20
+ cleanup || error "stopping $FSNAME failed with invalid sys param"
+ setup
+ check_mount || "client was not mounted with invalid sys param"
+ cleanup || error "stopping $FSNAME failed with invalid sys param"
+ return 0
-run_test 42 "invalid config param should not prevent client from mounting"
+run_test 42 "allow client/server mount/unmount with invalid config param"
test_43() {
[ $UID -ne 0 -o $RUNAS_ID -eq 0 ] && skip_env "run as root"
test_43() {
[ $UID -ne 0 -o $RUNAS_ID -eq 0 ] && skip_env "run as root"