[LU-14445] hyphen in filename is "legal" but poorly handled Created: 18/Feb/21  Updated: 23/Feb/21

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

Type: Bug Priority: Minor
Reporter: Nathaniel Clark Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Lustre utils allows for a filesystem to be created with a hyphen ( - ) in the name.

This will lead to odd errors:

  • string processing of fsname-target "usually" does the right thing
  • Testing for fsname vs target name looks for a hyphen

Workaround: Don't do that

Proposed fix: make hypen an invalid filesystem name character (leaving just alphanumeric and underscore ( _ )

 



 Comments   
Comment by John Hammond [ 18/Feb/21 ]

Using hyphens in FS names is long supported and commonly used. I do not think we should disallow it. I would suggest that we:

  1. Disallow starting with a hyphen. (IIRC we may require somewhere that the FS name starts with a letter. If we don't then that may be a good policy.)
  2. Disallow a list of bad substrings "MDT", "OST", "mdtlov", "clilmv", "client", etc.
  3. Have an "--i-know-what-i-am-doing" flag in mkfs that allows overriding the check.
  4. Audit our source for unsafe/lazy strstr() usage.
  5. Consolidate validation and parsing logic into a single place.
Comment by Aurelien Degremont (Inactive) [ 23/Feb/21 ]

I've never seen anybody doing this. I would have say them don't do that, and it is likely not supported. And when I see your comment, i feel like, this is not a good idea to support it

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