[LU-16134] lctl set_param -F translate all settings to mgs/params config Created: 02/Sep/22  Updated: 28/Sep/23  Resolved: 28/Sep/23

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.16.0

Type: Bug Priority: Minor
Reporter: Alexander Boyko Assignee: Alexander Boyko
Resolution: Fixed Votes: 0
Labels: patch

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

A YAML file with settings has event type conf_param and set_param.

- {device: testfs-MDT0001, event: conf_param, index: 76, parameter:
  lod.qos_threshold_rr=100}
- { index: 17, event: set_param, device: general,
  parameter: jobid_var, value: procname_uid }

The main difference for type is where setting is stored and how it is applied. A conf_param setting locates at a specific to service configuration file (lustre-MDT0000, fs-OST0020). A set_param setting locates at a params file. A params is applied to all nodes, and a conf_param to a specific service.
set_param -F yaml.file translates all setting to a set_param -P.
And this brings an errors like

Nov 16 11:35:52 kjlmo704 systemd-udevd[1738733]: Process '/usr/sbin/lctl set_param 'osc.testfs-OST0000-osc-MDT0000.checksums=0'' failed with exit code 2.
Nov 16 11:35:52 kjlmo704 systemd-udevd[1738736]: Process '/usr/sbin/lctl set_param 'ost.testfs-OST0001.sync_journal=0'' failed with exit code 2.

becase params would be applied at all nodes and many nodes does not have such device or subsystem.

The right solution is to adopt applying yaml file to distinguish set_param and conf_param settings, and store it in a right way. This approach has a conflict in naming
lctl conf_param
lctl set_param
lctl set_param -F (for both)
so I introduced a new command lctl apply_yaml.



 Comments   
Comment by Gerrit Updater [ 02/Sep/22 ]

"Alexander Boyko <alexander.boyko@hpe.com>" uploaded a new patch: https://review.whamcloud.com/48419
Subject: LU-16134 utils: adds lctl apply_yaml
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c7f52dd941fd9735088fd4f5cf164787298a0cc8

Comment by Gerrit Updater [ 28/Sep/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/48419/
Subject: LU-16134 utils: adds lctl apply_yaml
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 29cfdc2f1e7a17be7605338cd5d12abd0314fbe5

Comment by Peter Jones [ 28/Sep/23 ]

Landed for 2.16

Generated at Sat Feb 10 03:24:18 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.