[LU-16572] YAML configuration issues Created: 17/Feb/23  Updated: 24/Apr/23

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

Type: Bug Priority: Minor
Reporter: Chris Horn Assignee: Chris Horn
Resolution: Unresolved Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Two issues with yaml config. One is specific to UDSP. The other is a general issue with parsing malformed yaml.

1. export --backup with UDSP rules creates yaml that cannot be imported.

[root@ct7-mds1 ~]# lctl list_nids
10.73.20.11@tcp1
10.73.20.12@tcp1
10.73.20.13@tcp2
[root@ct7-mds1 ~]# lnetctl udsp add --src tcp1 --priority 0
[root@ct7-mds1 ~]# lnetctl udsp add --src tcp2 --priority 1
[root@ct7-mds1 ~]# lnetctl export --backup > /tmp/lnet.conf
[root@ct7-mds1 ~]# lnetctl lnet unconfigure
[root@ct7-mds1 ~]# lnetctl lnet configure
[root@ct7-mds1 ~]# lnetctl import /tmp/lnet.conf
    - udsp:
          errno: -1
          descr: "The combination of src, dst and rte is not supported"
    - udsp:
          errno: -1
          descr: "The combination of src, dst and rte is not supported"
yaml:
    - helper:
          errno: -1
          descr: "call back for 'udsp' not found"
[root@ct7-mds1 ~]# cat /tmp/lnet.conf
...
udsp:
    - idx: 0
      src: tcp1
      dst: NA
      rte: NA
      action:
          priority: 0
    - idx: 1
      src: tcp2
      dst: NA
      rte: NA
      action:
          priority: 1

2. If some field is missing in one section but present in another then the yaml parser may find it in second location and apply it to first. For example, this can create malformed UDSP rules (but applies to all yaml parsing, AFAICT):

# cat /etc/lnet.conf
# udsp:
    - idx: 0
      src: kfi
      action:
          priority: 0
    - idx: 1
      dst: 867@kfi
      action:
          priority: 0
# lnetctl import /etc/lnet.conf
# lnetctl udsp show
udsp:
    - idx: 0
      src: kfi
      dst: 897@kfi  <<<< Malformed rule
      rte: NA
      action:
          priority: 0
    - idx: 1
      src: NA
      dst: 897@kfi
      rte: NA
      action:
          priority: 0


 Comments   
Comment by Gerrit Updater [ 21/Feb/23 ]

"Chris Horn <chris.horn@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50082
Subject: LU-16572 lnet: export backup does not work with udsp
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 989ba834d60f749320299755198b3a337452f887

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