[LU-8912] nodemap: error: nodemap_add_range: nodemap ranges must be contiguous Created: 06/Dec/16  Updated: 09/Apr/18  Resolved: 03/Mar/18

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

Type: Bug Priority: Minor
Reporter: Stephane Thiell Assignee: Kit Westneat
Resolution: Fixed Votes: 0
Labels: None
Environment:

CentOS 7.2, Lustre-2.8.60


Issue Links:
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Hi, we noticed the following minor issue when trying to add our IB network 10.210.32.0/20 to nodemap:

$ lctl nodemap_add_range --name sherlock --range 10.210.[32-47].[0-255]@o2ib3
error: nodemap_add_range: nodemap ranges must be contiguous
$ cat /proc/fs/lustre/nodemap/sherlock/ranges
[

]



The workaround is either to add 16 separate entries (10.210.32.[0-255], 10.210.33.[0-255] etc.), or a single larger range (whenever possible).

Thanks,
Stephan



 Comments   
Comment by Peter Jones [ 06/Dec/16 ]

Kit

Could you please advise on this issue?

Thanks

Peter

Comment by Kit Westneat [ 12/Dec/16 ]

I'm not sure how the contiguous ranges is figured out, I'll try to see how hard it would be to get this to work. 

Comment by Kit Westneat [ 13/Dec/16 ]

It looks like the LNET range parsing is currently not complete, and broken in parts. It would be much easier to use a subset of the range. The full LNET range syntax supports multiple NID expressions and multiple range expressions within the NID expressions. For example, these are both valid:
lctl nodemap_add_range --name c0 --range "10.210.1.[0-255]@tcp 10.210.2.0@tcp"
lctl nodemap_add_range --name c0 --range "10.210.1.[33,31,32]@tcp"

It would be significantly easier to parse if we only allow a single NID expression per range, and a single range expression per IP expression list.

Alternatively, lctl actually just converts the range syntax into a simpler one read by the MGS, which is just <first nid>:<last nid>. Would it be too confusing to have sysadmins use that directly?

Comment by Stephane Thiell [ 13/Dec/16 ]

Hi Kit,

Thanks for looking at this! It would be better if the sysadmin can just add <first nid>:<last nid>, as it is already the format used internally by the MGS and also used when accessing the nodemap range config (using /proc/fs/lustre/nodemap/sherlock/ranges for example). I am sure it would be less confusing after all, along with the restrictions of range syntax that you propose to avoid any mistakes.

Comment by Kit Westneat [ 15/Dec/16 ]

I tend to agree with you, but on our nodemap call, Intel voiced a strong preference for supporting the full LNET range expression support. I've prepared a bug fix patch to address your immediate issue.

The idea behind the full LNET range support is that instead of requiring non-contiguous ranges, if a non-contiguous range is given to lctl, multiple contiguous ranges will be created in the backend. I'll create an improvement ticket to track the work on that.

Comment by Gerrit Updater [ 16/Dec/16 ]

Kit Westneat (kit.westneat@gmail.com) uploaded a new patch: https://review.whamcloud.com/24397
Subject: LU-8912 nodemap: fix contiguous range support
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: f9bf47f8590cdd77a7b896eea7e83e91782f04bd

Comment by Minh Diep [ 08/Dec/17 ]

kit.westneat, please rebase the patch manually. thanks

Comment by Gerrit Updater [ 03/Mar/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/24397/
Subject: LU-8912 nodemap: fix contiguous range support
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: eac95a6587af4061b36b35051e191ca27bc6b1a3

Comment by Peter Jones [ 03/Mar/18 ]

Landed for 2.11

Comment by Gerrit Updater [ 05/Mar/18 ]

Minh Diep (minh.diep@intel.com) uploaded a new patch: https://review.whamcloud.com/31521
Subject: LU-8912 nodemap: fix contiguous range support
Project: fs/lustre-release
Branch: b2_10
Current Patch Set: 1
Commit: 1f9c0431a29e2f0a8cac90eef9ae0dfa18b02cae

Comment by Gerrit Updater [ 05/Apr/18 ]

John L. Hammond (john.hammond@intel.com) merged in patch https://review.whamcloud.com/31521/
Subject: LU-8912 nodemap: fix contiguous range support
Project: fs/lustre-release
Branch: b2_10
Current Patch Set:
Commit: 92d562457b947f02891e7c76b265bde4f9ed23c2

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