[LU-6912] rework autoconf rules for external OFED to avoid dependency from OS Created: 27/Jul/15  Updated: 14/Oct/15  Resolved: 31/Aug/15

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

Type: Improvement Priority: Major
Reporter: Dmitry Eremin (Inactive) Assignee: Dmitry Eremin (Inactive)
Resolution: Fixed Votes: 0
Labels: None

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

 Description   

We don't check for new version of RHEL releases. And any attempt to compile Lustre with external OFED will fail on RHEL 6.[67] and RHEL 7.x.

case "$RHEL_RELEASE_NO" in
64)
      EXTRA_OFED_INCLUDE="$EXTRA_OFED_INCLUDE -DCONFIG_COMPAT_RHEL_6_4" ;;
65)
      EXTRA_OFED_INCLUDE="$EXTRA_OFED_INCLUDE -DCONFIG_COMPAT_RHEL_6_4 -DCONFIG_COMPAT_RHEL_6_5" ;;
esac

OFED distributive (at least latest versions) has autoconfig header file (compat_autoconf.h) with full set of defines we should specify for current OS. We should use it instead of provide our own defines and checks. This allow avoid dependency from OS and OFED version.



 Comments   
Comment by James A Simmons [ 27/Jul/15 ]

Do we have to do this for SLES12 and Ubuntu[14|15] as well?

Comment by Dmitry Eremin (Inactive) [ 27/Jul/15 ]

This is a good question!

Comment by Christopher Morrone [ 28/Jul/15 ]

Why are we setting CONFIG_COMPAT_RHEL_6_4 on RHEL 6.5?

Comment by James A Simmons [ 30/Jul/15 ]

I think setting CONFIG_COMPAT_RHEL_6_4 on 6.5 is a bug. I just looked at OFED 3.18 and we don't need to worry about Ubuntu or SLES12 since they follow very closely the upstream kernel OFED sets CONFIG_COMPAT_* to some kernel version. So SLES12 just ends up being CONFIG_COMPAT_3_12. Only RHELX needs special help since it is a mutant kernel.

Comment by Dmitry Eremin (Inactive) [ 30/Jul/15 ]

No, it's not a bug. It's requirement. According OFED sources they use new defines only for new portion of code specifically related to new OS support, All previous defines should be specified also. If you see in OFED configuration script you will see the following:

RHEL_MINOR := $(shell grep ^RHEL_MINOR $(KLIB_BUILD)/Makefile | sed -n 's/.*= *\(.*\)/\1/p')
COMPAT_RHEL_VERSIONS := $(shell I=$(RHEL_MINOR); while [ "$$I" -ge 0 ]; do echo $$I; I=$$(($$I - 1)); done)
$(foreach ver,$(COMPAT_RHEL_VERSIONS),$(eval CONFIG_COMPAT_RHEL_$(RHEL_MAJOR)_$(ver)=y))

So, for RHEL 6.5 all defines (6.4, 6.3, 6.2, 6.1 and 6.0) will be specified.

Actually we will have an error of compilation on RHEL 6.5 only if CONFIG_COMPAT_RHEL_6_4 will not be specified. But I think current approach with specifing defines for OFED is not correct and latest issue LU-6769 prove this. OFED distributive (at least latest versions) has autoconfig header file (compat_autoconf.h) with full set of defines we should specify for current OS. We should use it instead of provide our own defines and checks. I'm working on this patch now.

Comment by Gerrit Updater [ 30/Jul/15 ]

Dmitry Eremin (dmitry.eremin@intel.com) uploaded a new patch: http://review.whamcloud.com/15811
Subject: LU-6912 lnet: rework autoconf rules for external OFED
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 0de9e3d2b4c08f03e18b43b14341002814607e0a

Comment by Dmitry Eremin (Inactive) [ 30/Jul/15 ]

Unfortunately header O2IBPATH/include/linux/compat_autoconf.h exist in modern OFEDs only. So we still need automatically generate CONFIG_COMPAT_RHEL__ for RHEL distributive if it absent. With patch http://review.whamcloud.com/15811 new RHEL versions will be supported automatically. Also no errors should be on Ubuntu if O2IBPATH set correctly to DKMS compiled directory.

Comment by Gerrit Updater [ 29/Aug/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15811/
Subject: LU-6912 lnet: rework autoconf rules for external OFED
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: d98974fce00c6974168173abe6fddca3a8c19670

Comment by Joseph Gmitter (Inactive) [ 31/Aug/15 ]

Landed for 2.8.

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