[LU-16659] mofed detection would detect multiple OFED installed by mistake for multiple kernels installed Created: 23/Mar/23  Updated: 10/May/23  Resolved: 01/May/23

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

Type: Bug Priority: Minor
Reporter: Gaurang Tapase Assignee: Gaurang Tapase
Resolution: Fixed Votes: 0
Labels: None

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

 Description   

If there are multiple kernels installed, specifying --with-o2ib=yes during configure fails saying that there are multiple OFED installed which is not the case as the mofed detection logic finds multiple directories with different kernels.

Need to just use the mofed path of the current running kernel while detection.



 Comments   
Comment by Gerrit Updater [ 04/Apr/23 ]

"Gaurang Tapase <gtapase@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50517
Subject: LU-16659 build: Detect the mofed path based on running kernel
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 56b49a8aa44ef2c07e821326341dfb9f8db75bbc

Comment by Gerrit Updater [ 04/Apr/23 ]

"Gaurang Tapase <gtapase@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50518
Subject: LU-16659 build: Detect the mofed path based on running kernel
Project: fs/lustre-release
Branch: b2_15
Current Patch Set: 1
Commit: 39423d030f2dce6e623a0f23d80e77461950dd61

Comment by Gerrit Updater [ 01/May/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/50517/
Subject: LU-16659 build: Detect the mofed path based on running kernel
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 99172e355fbb37d2ba671d08ce0370ac0e8ae971

Comment by Peter Jones [ 01/May/23 ]

Landed for 2.16

Comment by Åke Sandgren [ 10/May/23 ]

The change in 50517 is wrong in my opinion.

The correct way would be to do

 

— a/lnet/autoconf/lustre-lnet.m4
+++ b/lnet/autoconf/lustre-lnet.m4
@@ -147,6 +147,9 @@
                                       egrep "${O2IBDIR}$" | head -n1)
 
                        if test -n "$O2IBDIR_PATH"; then
+                                if test -d $O2IBDIR_PATH/${LINUXRELEASE}; then
+                                    O2IBDIR_PATH=$O2IBDIR_PATH/${LINUXRELEASE}
+                                fi
                                O2IBPATHS=$(find $O2IBDIR_PATH -name rdma_cm.h |
                                        sed -e 's/\/include\/rdma\/rdma_cm.h//')
                        fi

 

Using uname -r makes it impossible to build for anything else than the currently running kernel

Comment by Minh Diep [ 10/May/23 ]

ake_s, could you please open an LU ticket and push the fix?

Comment by Gerrit Updater [ 10/May/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/50518/
Subject: LU-16659 build: Detect the mofed path based on running kernel
Project: fs/lustre-release
Branch: b2_15
Current Patch Set:
Commit: 42ff616c73ad759e41fed8d99759c0c42a4d907d

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