[LU-14311] LNet export should not include @lo peer information Created: 08/Jan/21  Updated: 08/Jan/21

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

Type: Bug Priority: Minor
Reporter: Will Johnson Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: LNET

Severity: 3
Project: Dynamic LNET Configuration
Rank (Obsolete): 9223372036854775807

 Description   

Exporting an LNet configuration includes the peers for @lo. For example, if I have the following configuration:

[root@mds1 tmp]# lnetctl net show
net:
    - net type: lo
      local NI(s):
        - nid: 0@lo
          status: up
    - net type: tcp
      local NI(s):
        - nid: 10.73.20.11@tcp
          status: up
          interfaces:
              0: eth1

and I run "lnetctl export --backup /etc/lnet.conf" I get the following:

net:
    - net type: tcp
      local NI(s):
        - interfaces:
              0: eth1
          tunables:
              peer_timeout: 180
              peer_credits: 8
              peer_buffer_credits: 0
              credits: 256
          CPT: "[0]"
peer:
    - primary nid: 0@lo
      Multi-Rail: False
      peer ni:
        - nid: 0@lo
    - primary nid: 10.73.20.22@tcp
      Multi-Rail: True
      peer ni:
        - nid: 10.73.20.22@tcp
    - primary nid: 10.73.20.21@tcp
      Multi-Rail: True
      peer ni:
        - nid: 10.73.20.21@tcp
    - primary nid: 10.73.20.12@tcp
      Multi-Rail: True
      peer ni:
        - nid: 10.73.20.12@tcp
global:
    numa_range: 0
    max_intf: 200
    discovery: 1
    drop_asym_route: 0

Notice that "nid 0@lo" is included in the peers. I can then try to import this configuration:

lnetctl net del --net tcp
lnetctl import /etc/lnet.conf

and will get the following output:

[root@mds1 tmp]# lnetctl net del --net tcp
[root@mds1 tmp]# lnetctl import /etc/lnet.conf
add:
    - net:
          errno: 0
          descr: "success"
    - peer_ni:
          errno: -8
          descr: "Success"
    - peer_ni:
          errno: 0
          descr: "Success"
    - peer_ni:
          errno: 0
          descr: "Success"
    - peer_ni:
          errno: 0
          descr: "Success"
    - max_interfaces:
          errno: 0
          descr: "success"
    - numa_range:
          errno: 0
          descr: "success"
    - discovery:
          errno: 0
          descr: "success"
    - drop_asym_route:
          errno: 0
          descr: "success"
[root@mds1 tmp]# echo $?
248

However, if I remove the nid 0@lo peer from the exported data and attempt to re-import, I get the following:

[root@mds1 tmp]# cat /etc/lnet.conf
net:
    - net type: tcp
      local NI(s):
        - interfaces:
              0: eth1
          tunables:
              peer_timeout: 180
              peer_credits: 8
              peer_buffer_credits: 0
              credits: 256
          CPT: "[0]"
peer:
    - primary nid: 10.73.20.22@tcp
      Multi-Rail: True
      peer ni:
        - nid: 10.73.20.22@tcp
    - primary nid: 10.73.20.21@tcp
      Multi-Rail: True
      peer ni:
        - nid: 10.73.20.21@tcp
    - primary nid: 10.73.20.12@tcp
      Multi-Rail: True
      peer ni:
        - nid: 10.73.20.12@tcp
global:
    numa_range: 0
    max_intf: 200
    discovery: 1
    drop_asym_route: 0

[root@mds1 tmp]# lnetctl net del --net tcp
[root@mds1 tmp]# lnetctl import /etc/lnet.conf
[root@mds1 tmp]# echo $?
0

If nid 0@lo is excluded in the peers section of the export then importing the file shouldn't produce an error.


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