conf-sanity.sh:test_66 is modified to illustrate the problem:
add EXCLUDE records to config file. lctl replace_nids removes
those records which leads to mounting problem
fix: Remove records marked as SKIP instead of EXCLUDE ones.
Lustre-change: https://review.whamcloud.com/14921
Lustre-commit:
00c89bf0148a105cb7145475194136dc672d1623
Change-Id: Ica4b23a74870d8ebcb09b240313df4d4c33bbbde
Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Signed-off-by: Alyona Romanenko <alyona.romanenko@seagate.com>
Cray-bug-id: MRP-2105
Cray-bug-id: MRP-2766
Reviewed-by: Sergey Cheremencev <c17829@cray.com>
Reviewed-by: Artem Blagodarenko <c17828@cray.com>
Test-Parameters: trivial envdefinitions=ONLY=66 testlist=conf-sanity
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34046
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
/* Track markers. Find given device */
if (lcfg->lcfg_command == LCFG_MARKER) {
marker = lustre_cfg_buf(lcfg, 1);
/* Track markers. Find given device */
if (lcfg->lcfg_command == LCFG_MARKER) {
marker = lustre_cfg_buf(lcfg, 1);
- /* Clean llog from records marked as CM_EXCLUDE.
- CM_SKIP records are used for "active" command
+ /* Clean llog from records marked as CM_SKIP.
+ CM_EXCLUDE records are used for "active" command
and can be restored if needed */
and can be restored if needed */
- if ((marker->cm_flags & (CM_EXCLUDE | CM_START)) ==
- (CM_EXCLUDE | CM_START)) {
+ if ((marker->cm_flags & (CM_SKIP | CM_START)) ==
+ (CM_SKIP | CM_START)) {
mrd->skip_it = 1;
return 1;
}
mrd->skip_it = 1;
return 1;
}
- if ((marker->cm_flags & (CM_EXCLUDE | CM_END)) ==
- (CM_EXCLUDE | CM_END)) {
+ if ((marker->cm_flags & (CM_SKIP | CM_END)) ==
+ (CM_SKIP | CM_END)) {
mrd->skip_it = 0;
return 1;
}
mrd->skip_it = 0;
return 1;
}
local OST1_NID=$(do_facet ost1 $LCTL list_nids | head -1)
local MDS_NID=$(do_facet $SINGLEMDS $LCTL list_nids | head -1)
local OST1_NID=$(do_facet ost1 $LCTL list_nids | head -1)
local MDS_NID=$(do_facet $SINGLEMDS $LCTL list_nids | head -1)
+ # add EXCLUDE records to config log, they are not to be
+ # removed by lctl replace_nids
+ set_conf_param_and_check mds \
+ "$LCTL get_param -n osc.$FSNAME-OST0000-osc-MDT0000.active" \
+ "$FSNAME-OST0000.osc.active" \
+ "0"
+
echo "replace_nids should fail if MDS, OSTs and clients are UP"
do_facet mgs $LCTL replace_nids $FSNAME-OST0000 $OST1_NID &&
error "replace_nids fail"
echo "replace_nids should fail if MDS, OSTs and clients are UP"
do_facet mgs $LCTL replace_nids $FSNAME-OST0000 $OST1_NID &&
error "replace_nids fail"
stop_mds || error "Unable to stop MDS"
fi
stop_mds || error "Unable to stop MDS"
fi
+ start_mgsmds || error "start mgsmds failed"
+ set_conf_param_and_check mds \
+ "$LCTL get_param -n osc.$FSNAME-OST0000-osc-MDT0000.active" \
+ "$FSNAME-OST0000.osc.active" \
+ "1"
+ start_ost || error "unable to start OST"
+ mount_client $MOUNT || error "mount client failed"
+
check_mount || error "error after nid replace"
cleanup || error "cleanup failed"
reformat
check_mount || error "error after nid replace"
cleanup || error "cleanup failed"
reformat