Whamcloud - gitweb
LU-17184 mgc: remove damaged local configs
authorMikhail Pershin <mpershin@whamcloud.com>
Fri, 13 Oct 2023 21:28:58 +0000 (00:28 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 14 Nov 2023 22:37:42 +0000 (22:37 +0000)
commit10b2cf42509e34859789428f0a93250ce5709cf7
treee536fdbce9149f8263891d4d1b916e06e636dd53
parent0130701eeb9da528df833bc49a6a63f17dfa665e
LU-17184 mgc: remove damaged local configs

If local config llog is damaged it can't be removed and
prevents target from mounting. This happens because
mgc_llog_local_copy() uses llog_erase() to remove llogs
which can't do the job if llog header is damaged.

Patch changes are:
- llog_erase() to don't initialize header but just destroy
  llog file
- mgc_llog_local_copy() to don't exit on backup to temp
  file but continue with remote llog copying anyway
- conf-sanity test_151 is added to check that target can
  mount with damaged local config

Lustre-change: https://review.whamcloud.com/52697
Lustre-commit: 6a6e4ee20fe5aaad4beab5477e1c7d05e4e702e2

Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I637749c38fd5ed03bdac5ca1cd60196f724ab0d1
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53124
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/mgc/mgc_request.c
lustre/obdclass/llog.c
lustre/tests/conf-sanity.sh