[LU-9544] 'lctl set_param -d fail_val=42' sets fail_val to 42 Created: 22/May/17  Updated: 30/Jan/22

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: easy

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

The -d (for delete) option to lctl set_param should be rejected if the -P option wasn't used as well, or it should automatically imply the -P option. Currently if used alone the
-d option is handled as a plain set param:

# lctl set_param -d fail_val
error: set_param: setting fail_val: no value
# lctl set_param -d fail_val=42
fail_val=42
# lctl get_param fail_val
fail_val=42

Also, if a value is erroneously supplied when using -P and -d then instead of being deleted, the parameter is set to the value with a trailing '='. (The params log will contain the new value, but the param write method may reject it).

# lctl set_param -P jobid_name=foo
# sleep 10
# lctl get_param jobid_name
jobid_name=foo
# lctl set_param -P -d jobid_name=foo
# sleep 10
# lctl get_param jobid_name
jobid_name=foo=

Generated at Sat Feb 10 02:27:07 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.