[LU-16267] LUTF fails when getting cpu_npartitions if non UTF-8 file is present in /etc/modprobe.d Created: 25/Oct/22  Updated: 27/Jan/23  Resolved: 27/Jan/23

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

Type: Bug Priority: Minor
Reporter: Cyril Bordage Assignee: Cyril Bordage
Resolution: Fixed Votes: 0
Labels: None

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

 Description   

When "f.get('cpu_npartitions=')" is used, LUFT will read all files in "/etc/modprobe.d" looking for the string "cpu_npartitions=". The file is opened with default encoding options, and if it is not the right one, looping on the line of the file and comparing them will lead to an exception.

 

This scenario will happen, for instance, if a file from /etc/modprobe.d is opened by vim that will save a swap file of this file in the same directory.



 Comments   
Comment by Gerrit Updater [ 25/Oct/22 ]

"Cyril Bordage <cbordage@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/48951
Subject: LU-16267 lnet: fix missing error check in LUTF
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 709ebf44f0d973fe25edb050f32430cc59342ce6

Comment by Gerrit Updater [ 27/Jan/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/48951/
Subject: LU-16267 lnet: fix missing error check in LUTF
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: eb6518f7fffe7315536a440e582a62f1316e3cd1

Comment by Peter Jones [ 27/Jan/23 ]

Landed for 2.16

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