[LU-10452] lnetctl export/import suggested improvements Created: 03/Jan/18  Updated: 06/Feb/18  Resolved: 06/Feb/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.11.0, Lustre 2.10.2
Fix Version/s: Lustre 2.11.0

Type: Improvement Priority: Minor
Reporter: James A Simmons Assignee: Amir Shehata (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Rank (Obsolete): 9223372036854775807

 Description   

Currently lnetctl export dumps everything. What ends up happening is admins will use lnetctl export to create a YAML config file but when using lnetctl import < config.file it will give lots of errors. For example when peer settings are included. Some things like lnet stats don't need to be in the YAML file generated with export. Lastly by default @lo is added to the YAML config file and when running lnetctl import < config.file you will see the following error:

descr: "missing mandatory parameters in NI config: 'interface'"

This is due to @lo missing a interface section. Harmless but it can be confusing for a lustre newbie



 Comments   
Comment by Amir Shehata (Inactive) [ 12/Jan/18 ]

Amir Shehata (amir.shehata@intel.com) uploaded a new patch: https://review.whamcloud.com/30845
Subject: LU-10452 lnet: cleanup YAML output
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 00528512e5faea56132bbc711554e1b0e34138d4

The command to export for backup configuration is:

lnetctl export -b > file.yaml
# or
lnetctl export -b file.yaml

The output will look similar to:

net:
    - net type: tcp
      local NI(s):
        - interfaces:
              0: eth0
          tunables:
              peer_timeout: 180
              peer_credits: 8
              peer_buffer_credits: 0
              credits: 256
          CPT: "[0]"
peer:
    - primary nid: 192.168.122.232@tcp
      Multi-Rail: True
      peer ni:
        - nid: 192.168.122.232@tcp
    - primary nid: 192.168.122.43@tcp
      Multi-Rail: True
      peer ni:
        - nid: 192.168.122.43@tcp
    - primary nid: 192.168.122.231@tcp
      Multi-Rail: True
      peer ni:
        - nid: 192.168.122.231@tcp
global:
    numa_range: 0
    max_intf: 200
    discovery: 1
Comment by Gerrit Updater [ 06/Feb/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/30845/
Subject: LU-10452 lnet: cleanup YAML output
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 859b7a4de2af542745d2248ec321da07a31b34cb

Comment by Peter Jones [ 06/Feb/18 ]

Landed for 2.11

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