Whamcloud - gitweb
LU-17250 mgs: generate a new MDT configuration by copy
authorEtienne AUJAMES <etienne.aujames@cea.fr>
Mon, 8 Jan 2024 15:06:08 +0000 (16:06 +0100)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 30 May 2024 00:42:05 +0000 (00:42 +0000)
commit26f1ac89e03dd8d27af61506e6b17582521a0922
tree00035f16652c8b9cd23edf93d3b880f42d752c0f
parenta6859830813e20f3f96e1c9edfa17d32877cd6dd
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.

Lustre-change: https://review.whamcloud.com/53614
Lustre-commit: d4682ff4cc44413810a68e572cf7f05d5b188bb4

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-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/55101
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@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