Whamcloud - gitweb
LU-10703 nodemap: save and clear fileset correctly 54/31954/3
authorEmoly Liu <emoly.liu@intel.com>
Tue, 20 Mar 2018 09:42:29 +0000 (17:42 +0800)
committerJohn L. Hammond <john.hammond@intel.com>
Mon, 16 Apr 2018 21:23:52 +0000 (21:23 +0000)
commitf822a1d6d1ff4abd4946675398fa20ec658ddc64
tree9125c155306537eb2d1cec963f83cae26d44ee52
parent741347aafb8053d02294650add007e1bf050e978
LU-10703 nodemap: save and clear fileset correctly

This patch is to fix the following two issues:
- When processing the nodemap_idx_type "NODEMAP_CLUSTER_IDX" in
  nodemap_process_keyrec(), fileset should be saved, otherwise,
  it will be changed to empty every time when client is notified
  to fetch nodemap logs (mgc_process_recover_nodemap_log()->
  nodemap_process_idx_pages()->nodemap_process_keyrec()).
- Allow 'fileset=clear' in addition to 'fileset=""' to clear
  fileset because either 'lctl set_param -P *.*.fileset=""' or
  'lctl nodemap_set_fileset --fileset ""' can only work on MGS,
  while on other non-MGS servers, they both will invoke upcall
  "/usr/sbin/lctl set_param nodemap.default.fileset=" by function
  process_param2_config(), which will cause "no value" error and
  won't clear fileset. 'fileset=""' is still kept for compatibility
  reason.

Also, sanity-sec.sh test_27a is modified and test_27b is added to
verify this patch.

Lustre-change: https://review.whamcloud.com/31450
Lustre-commit: 5b64d9fb0d5c5f292548c23e7841cc30f7a8423e

Change-Id: I23236a4f1b67ac555713d6b3f059df699fdc91dc
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31954
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/ptlrpc/nodemap_handler.c
lustre/ptlrpc/nodemap_storage.c
lustre/tests/sanity-sec.sh