Whamcloud - gitweb
LU-17250 mgs: generate a new MDT configuration by copy 14/53614/11
authorEtienne AUJAMES <etienne.aujames@cea.fr>
Mon, 8 Jan 2024 15:06:08 +0000 (16:06 +0100)
committerOleg Drokin <green@whamcloud.com>
Tue, 30 Apr 2024 06:46:51 +0000 (06:46 +0000)
commitd4682ff4cc44413810a68e572cf7f05d5b188bb4
tree8060c8d3de756e21be360a811d04671532079a81
parentb671d0904e4af33e72764891b0170db9e5a2f75c
LU-17250 mgs: generate a new MDT configuration by copy

The configuration for a new MDT is generated by reading the client
configuration. The MGS filter existing mdc/osc, interpret the
records and then create the corresponding osp/osc device for the MDT.

The main idea of this patch is first to convert and copy the records
from the client configuration to create the new MDT.
And then, copy the remaining record sections from an existing MDT.
So the new MDT can inherit OST pools and parameters from the existing
one.

This avoids complex compatibility checks for IPv4/v6 NID because
add_uuid records are copied without need to parse NIDs.
This also allows to copy "add failnid" section from the client.

This patch extend the usage to "add failnid" section on MDT
configurations.

Here are the steps to copy a existing MDT configuration:

1/ read client configuration and generate osp MDT/OST records for the
   new MDT
1/ find an existing MDT configuration
2/ copy and convert the remaining configuration records from the
   existing MDT configuration (parameters and OST pools)

Add the regresion test conf-sanity 137.

Test-Parameters: mdtcount=4 fstype=zfs testlist=conf-sanity
Test-Parameters: mdtcount=4 fstype=ldiskfs testlist=conf-sanity
Test-Parameters: mdtcount=4 fstype=zfs testlist=conf-sanity env=ONLY=137,ONLY_REPEAT=10
Test-Parameters: mdtcount=4 fstype=ldiskfs testlist=conf-sanity env=ONLY=137,ONLY_REPEAT=10
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I4a99085b8930a0dd8002bde87d4e8c575aaccba0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53614
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_cfg.h
lustre/mgs/mgs_internal.h
lustre/mgs/mgs_llog.c
lustre/tests/conf-sanity.sh
lustre/tests/test-framework.sh