Whamcloud - gitweb
LU-17184 mgc: remove damaged local configs 97/52697/6
authorMikhail Pershin <mpershin@whamcloud.com>
Fri, 13 Oct 2023 21:28:58 +0000 (00:28 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 8 Nov 2023 22:17:03 +0000 (22:17 +0000)
commit6a6e4ee20fe5aaad4beab5477e1c7d05e4e702e2
tree0ad6cccd0910e8c80417cddf8b507326a9509321
parent21295b169bd70c68cd99e2db6bac3fa60a8f2c83
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

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