[LU-6043] DLC: lnetctl import does not configure any networks Created: 17/Dec/14  Updated: 12/Jan/15  Resolved: 12/Jan/15

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

Type: Bug Priority: Major
Reporter: James A Simmons Assignee: Amir Shehata (Inactive)
Resolution: Fixed Votes: 0
Labels: lnet

Attachments: File lnet.yaml    
Issue Links:
Related
is related to LU-6099 DLC: YAML output must adhere to parsi... Resolved
is related to LU-6045 DLC: Address a minor inconsistency be... Resolved
Severity: 3
Project: Dynamic LNET Configuration
Rank (Obsolete): 16844

 Description   

I can bring up a network with lctl net up and once up I used lnetctl export to create a configuration file. After I brought down the network and attempted to bring the network usig lnetctl import < myconfig.yaml it failed with the following message:

>lnetctl import < lnet.yaml
yaml:

  • builder:
    errno: -1
    descr: Failed to handle token:10 [state=6, rc=-2]


 Comments   
Comment by James A Simmons [ 17/Dec/14 ]

Sorry no patch. Not familiar enough with yaml to fix.

Comment by James Nunez (Inactive) [ 17/Dec/14 ]

Amir,

Would you please comment on this ticket?

Thanks,
James

Comment by Gerrit Updater [ 18/Dec/14 ]

Amir Shehata (amir.shehata@intel.com) uploaded a new patch: http://review.whamcloud.com/13115
Subject: LU-6043 lnet: Fix YAML FSM and other cleanup
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 90204d6df3a9a0385a7401e56d2ca1a0819c0633

Comment by Amir Shehata (Inactive) [ 18/Dec/14 ]

Please note that when you do lnetctl export, you'll get output similar to:

net:
    - net: lo
      nid: 0@lo
      status: up
      tunables:
          peer_timeout: 0
          peer_credits: 0
          peer_buffer_credits: 0
          credits: 0
    - net: tcp
      nid: 192.168.205.156@tcp
      status: up
      interfaces:
          0: eth4
      tunables:
          peer_timeout: 180
          peer_credits: 8
          peer_buffer_credits: 0
          credits: 256
    - net: tcp1
      nid: 192.168.206.167@tcp1
      status: up
      interfaces:
          0: eth5
      tunables:
          peer_timeout: 180
          peer_credits: 8
          peer_buffer_credits: 0
          credits: 256
route:
    - net: tcp3
      gateway: 10.1.1.1@tcp
      hop: 1
      priority: 0
      state: up
    - net: tcp4
      gateway: 10.1.1.1@tcp
      hop: 1
      priority: 0
      state: up

It will dump all currently configured items. To properly test, you'll first need to configure lnet without loading any module parameters. To do that you can issue the following commands:

modprobe lnet
lnetctl lnet configure

Then after you configure lnet:

lnetctl import < config.yaml

When you issue the following command it will attempt to configure each item. If the item is already configured it will fail configuring that particular item (example, if you try to reconfig an already existing network it will fail), but it will not stop and will continue to configure the rest of the items.

Unfortunately, there is a minor inconsistency in the behavior when you add an existing net vs when you add an existing route. The former will error and the latter will be ignored. We can address this inconsistency in a separate patch (but it's a minor issue)

You'll see that when you try to configure the LO Net, since it's part of the configuration but is always configured implicitly and DLC doesn't provide a way to configure the LO Net, it will fail.

the output would likely look similar to

add:
    - net:  // <-- this is the error you get when you try to configure LO
          errno: -2
          descr: "mandatory parameter 'if' not specified. Optionally specify ip2net parameter"
    - net:
          errno: 0
          descr: "success"
    - net:
          errno: 0
          descr: "success"
    - route:
          errno: 0
          descr: "Success"
    - route:
          errno: 0
          descr: "Success"

Currently there is no way to configure LNet from YAML (IE: lnetctl lnet configure). It is assumed that you have already configured LNet either through:

lctl network up
or
lnetctl lnet configure [--all]

If you think it's useful to configure LNet vial YAML, we can address that in a separate patch.

Comment by James A Simmons [ 18/Dec/14 ]

So I did a few different approach with your included patch.

First I found without the patch lnetctl net configure --all only adds lo interface after I run modprobe lnet. The system is configured for o2ib as well. With the patch it does work

The test of running modprobe lnet; lnetctl net configure; lnetctl import < lnet.yaml still fails with the reported error.

Comment by Amir Shehata (Inactive) [ 02/Jan/15 ]

sorry was on vacation.

Can you please share your lnet.yaml file so I can test on my side.

Comment by Gerrit Updater [ 04/Jan/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13115/
Subject: LU-6043 lnet: Fix YAML FSM and other cleanup
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 943469dc33ab665d3908847a21dfee6a3b574505

Comment by James A Simmons [ 06/Jan/15 ]

Here is the lnet yaml file giving me headaches.

Comment by Amir Shehata (Inactive) [ 09/Jan/15 ]

I fixed your issue in a different patch:
http://review.whamcloud.com/#/c/13304/

Comment by James A Simmons [ 09/Jan/15 ]

You fixed it. Now it works. Thank you.

Generated at Sat Feb 10 01:56:42 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.