Whamcloud - gitweb
LU-17920 mgs: handle compound permanent parameters
Special parameters like "nrs_tbf_rule" or "pcc" can "append" several
values.
e.g: add several TBF rules for ost_io
# lctl set_param ost.OSS.ost_io.nrs_policies="tbf jobid"
# lctl set_param ost.OSS.ost_io.nrs_tbf_rule="start login
jobid={*login*} rate=5000"
# lctl set_param ost.OSS.ost_io.nrs_tbf_rule="start rbh
jobid={*rbh*} rate=100000"
Multiple permanent values are not supported for these parameters since
the it is possible to set a single value today.
The current implementation will only stores the last value and remove
the old records.
This patch allows "pcc", "nrs_tbf_rule" and future "wbc" to store
several values for the same parameter: it appends new llog records
without deleting the old ones.
If the MGS found an existing record matching the new value, it will
not append the new one.
To remove from the configuration only one entry, the patch modifies
the behavior of "lfs set_param -Pd" and "lfs conf_param -d" to match
the parameter name and the value if set. Those commands return
-ENOENT if the entries are not found.
e.g: remove the TBF rule "rbh" from the configuration
# lctl set_param -Pd ost.OSS.ost_io.nrs_tbf_rule="start rbh
jobid={*rbh*} rate=100000"
e.g: remove all TBF rules for ost_io service
# lctl set_param -Pd ost.OSS.ost_io.nrs_tbf_rule
Add regression test conf-sanity 123aj.
Fix conf-sanity 123ag to use "lctl set_param -P -d" with the value set
in configuration (not "ANY").
Fix sanity-sec 27a to use "lctl set_param -P -d" only if the parameter
have been set before.
Test-Parameters: testlist=conf-sanity env=ONLY=123
Test-Parameters: testlist=conf-sanity env=ONLY=123
Test-Parameters: testlist=conf-sanity env=ONLY=123aj,ONLY_REPEAT=20
Test-Parameters: testlist=sanity env=ONLY=400b
Test-Parameters: testlist=sanity env=ONLY=401db,ONLY_REPEAT=20
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: I9d3ec3d8d9004218138468739d4f7c5ea8a3eadd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56218
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>