Whamcloud - gitweb
LU-9699 osp: don't assert on OSP duplicating 53/27753/21
authorJadhav Vikram <vikramjadhav87@yahoo.co.in>
Tue, 25 Jul 2017 07:01:37 +0000 (12:31 +0530)
committerOleg Drokin <green@whamcloud.com>
Wed, 22 Sep 2021 04:42:17 +0000 (04:42 +0000)
commit98f107b53e4daa3bfaf026c379c0a9c41cb5f161
treee3e1034ccc300ff9b20ad8d57f68e24e4fbbffb0
parent9059a1de8913a6e81ada3f20080af0e18e4b498e
LU-9699 osp: don't assert on OSP duplicating

Writeconf on an MDT with index > 0000 will cause
"add mdc" to be added to $FSNAME-client config
and "add osp" to be added to $FSNAME-MDTXXXX configs.

However, the configs may already contain these
directives. Duplicating the OSP device will
cause the assertion failure in osp_obd_connect():
ASSERTION( osp->opd_connects == 1 ) failed

Duplicating the MDC just returns -EEXIST in similar
situation.

A possible solution is to check configs for duplicates
before writing to them. However, sometimes we
would like to change nids which are part of
"add mdc" and "add osp".

Another solution is to mark previous entries with
SKIP flags. This patch implements this approach.
Since after revoking the config lock, the clients
and the MDTs will receive the updated log and
apply its newer entries, we still have to handle
OSP duplication, but this is only an issue
immediately after writeconf processing.

Seagate-bug-id: MRP-2634, MRP-3865
Change-Id: Idd7ad43c78d50e6bbe715850503aa0b01fcbf071
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/27753
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mgs/mgs_llog.c
lustre/osp/osp_dev.c
lustre/osp/osp_internal.h
lustre/tests/conf-sanity.sh