[LU-12410] Refactor lnetctl peer nid handling to utilize nidstrings library Created: 09/Jun/19  Updated: 11/Oct/22  Resolved: 03/Jan/20

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.13.0, Lustre 2.12.2
Fix Version/s: Lustre 2.14.0

Type: Improvement Priority: Major
Reporter: Chris Horn Assignee: Chris Horn
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Refactoring this ticket to widen the scope a bit.

The handling of nids by lnetctl/liblnetconfig has a couple of issues. The first is incomplete support for all NID formats supported by LNet. The second is that we have some code duplication between lnetctl/liblnetconfig and the nidstrings library.

I propose to expand the nidstrings library to cover a use-case that is needed by lnetctl/liblnetconfig. Namely the expansion of a "nidrange" into a list of LNet nids.

For posterity, the original description of this ticket is below. It documents the limitation of lnetctl peer add/del in dealing with numeric NID addresses:
The nid parsing for lnetctl peer add (and delete) goes through the ip2nets path, even when the (undocumented) --ip2net option is not used. That ip2nets code does not support gnilnd because gnilnd doesn't use ip addresses. As such you cannot configure peers with gni addresses using lnetctl.

I think this should be cleaned up so that:

arguments to --prim_nid and --nid are treated as LNet nids, not "nid expressions".

"nid expressions" can only be specified via the --ip2net option.



 Comments   
Comment by Gerrit Updater [ 09/Jun/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35117
Subject: LU-12410 lnet: Fix lnetctl peer add/del nid parsing
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 3f33a996119b8be13715e559343d11df7cf231f0

Patch abandoned

Comment by Gerrit Updater [ 25/Jun/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35303
Subject: LU-12410 libcfs: Implement address range expansion
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a3c70086ad92be2f7f0d99a19c95076a9280825d

Comment by Gerrit Updater [ 25/Jun/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35304
Subject: LU-12410 lnet: Implement DLC wrapper for cfs_parse_nidlist
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: edb8d342661daf67501ae31aff6d0f7bd3ebe996

Comment by Gerrit Updater [ 25/Jun/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35305
Subject: LU-12410 lnet: Convert lnetctl peer add
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c76de322c24143f96bdfe4290d54934af93b8f98

Comment by Gerrit Updater [ 25/Jun/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35306
Subject: LU-12410 lnet: Convert lnetctl peer del
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 829faf3b73b8ea3ad325b2d53c227f73fba3d0ac

Comment by Gerrit Updater [ 25/Jun/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35307
Subject: LU-12410 lnet: Convert yaml peer configuration
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2696c1f13215c3e32849f6d428de85a7684212eb

Comment by Gerrit Updater [ 25/Jun/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35308
Subject: LU-12410 lnet: Convert lnetctl route add
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 0191991ae03ec22f122320e18d688aea5487456f

Comment by Gerrit Updater [ 25/Jun/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35309
Subject: LU-12410 lnet: Convert lnetctl route del to nidstrings
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 82925006c7a6e373fa23d042593b7605cc4d8173

Comment by Gerrit Updater [ 25/Jun/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35310
Subject: LU-12410 lnet: Delete unused nid parsing code
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: b2765a32bf0e41a10ab801e73277d524fdf6adfa

Comment by Chris Horn [ 25/Jun/19 ]

For some reason one of the comments made by Gerrit Updater was duplicated so one of the patches was missed. Here's the information:

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35306
Subject: LU-12410 lnet: Convert lnetctl peer del
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 829faf3b73b8ea3ad325b2d53c227f73fba3d0ac

Comment by Gerrit Updater [ 29/Jun/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35386
Subject: LU-12410 tests: Add testsuite for lnetctl and DLC
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2d11c777396d5dd0e030d2b73cfdd73741ec0902

Comment by Gerrit Updater [ 30/Jun/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35389
Subject: LU-12410 tests: Add auster option to skip setup
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 58226644138cf6eb4f22b3c4ee0d92c8bbd2601b

Comment by Gerrit Updater [ 01/Jul/19 ]

Oleg Drokin (green@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35398
Subject: LU-12410 tests: ignore return status of removal of 99-lustre-test.rules
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 714c99ab58d5de910696976ffc08a9cddf05f279

Comment by Gerrit Updater [ 12/Jul/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35398/
Subject: LU-12410 tests: ignore return status of removal of 99-lustre-test.rules
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: dcb60fb0be54f852dc0bc09e0b6398aedf253204

Comment by Gerrit Updater [ 14/Jul/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35506
Subject: LU-12410 tests: Add gni tests to sanity-dlc
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: d612206fe6fb55786017bb0e61bfcf2408d4a191

Comment by Gerrit Updater [ 14/Jul/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35505
Subject: LU-12410 lnet: Implement method to tokenize nidstrings
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: cc860cd65d9c13ae78ad18c80e37a4b94680619a

Comment by Gerrit Updater [ 14/Jul/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/35504
Subject: LU-12410 lnet: Define enum for lnetctl commands
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 4cde78871f9ec392575edacff0f077f0779b561a

Comment by Gerrit Updater [ 19/Sep/19 ]

Chris Horn (hornc@cray.com) uploaded a new patch: https://review.whamcloud.com/36242
Subject: LU-12410 lnet: Add additional output to sanity-lnet.sh
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a70a569afdaf8567b3b7f964bf13ea39d7ea8c21

Comment by Gerrit Updater [ 04/Oct/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35389/
Subject: LU-12410 tests: Add auster option to skip setup
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 79311aca7d7aaeb61d04fee04280d2133220d5d7

Comment by Gerrit Updater [ 12/Nov/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36242/
Subject: LU-12410 lnet: Add additional output to sanity-lnet.sh
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 32528a689889989607a34b21efa583429bda1422

Comment by Gerrit Updater [ 20/Dec/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35386/
Subject: LU-12410 tests: Additional test cases for lnetctl and DLC
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 9cf6596da2b5d83db1ceea66c33cb8ab765a7f94

Comment by Gerrit Updater [ 20/Dec/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35303/
Subject: LU-12410 libcfs: Implement address range expansion
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: b0d131cd725b82adbfa44b082a9c5446ef7194d4

Comment by Gerrit Updater [ 20/Dec/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35304/
Subject: LU-12410 lnet: Implement DLC wrapper for cfs_parse_nidlist
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 0e030c4fb7bc482785d336be9b97b1183b6abd20

Comment by Gerrit Updater [ 20/Dec/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35504/
Subject: LU-12410 lnet: Define enum for lnetctl commands
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 04dda288a415312747ea783ef59a4a92103a3452

Comment by Gerrit Updater [ 03/Jan/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35505/
Subject: LU-12410 lnet: Implement method to tokenize nidstrings
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: c6e9a5d02936a215aa01021eab6d8827ceb6b19d

Comment by Gerrit Updater [ 03/Jan/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35305/
Subject: LU-12410 lnet: Convert lnetctl peer add and del
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 892f675e660a5afa0d93d883aab46bb54f107818

Comment by Gerrit Updater [ 03/Jan/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35307/
Subject: LU-12410 lnet: Convert yaml peer configuration
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: e14235f35cb6bbadb7005192fac8524077c8c7bf

Comment by Gerrit Updater [ 03/Jan/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35308/
Subject: LU-12410 lnet: Convert lnetctl route add and del
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 59836691cbedcf3b7912ecbed7fc286cf1d4f19f

Comment by Gerrit Updater [ 03/Jan/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35506/
Subject: LU-12410 tests: Add gni tests to sanity-lnet
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6a8335be5c2bb29999d85e35d9b59ce23f025629

Comment by Gerrit Updater [ 03/Jan/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35310/
Subject: LU-12410 lnet: Delete unused nid parsing code
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 03c4b6c8b77e8f52ea9fd1fd040d1aafbf95b470

Comment by Peter Jones [ 03/Jan/20 ]

Looks like everything has now landed for 2.14

Comment by Gerrit Updater [ 08/Jul/21 ]

James Nunez (jnunez@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/44188
Subject: LU-12410 lnet: Add additional output to sanity-lnet.sh
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 459866a9806fb435345fc580c86e16b4f7474c2b

Comment by Gerrit Updater [ 03/Dec/21 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/44188/
Subject: LU-12410 lnet: Add additional output to sanity-lnet.sh
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: a8c513b61c517f643119fe65629ab7952c7b37b4

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