[LU-1027] more flexibility in lbuild for building OFA OFED Created: 24/Jan/12  Updated: 03/Oct/17  Resolved: 03/Oct/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.1.0, Lustre 1.8.x (1.8.0 - 1.8.5)
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Brian Murrell (Inactive) Assignee: Minh Diep
Resolution: Won't Do Votes: 0
Labels: None

Rank (Obsolete): 9742

 Description   

Currently, to build OFA OFED with Lustre, Jenkins gives a specific version of OFA OFED to lbuild to build. This is sub-optimal as it means that all kernels on a branch (and all branches in the case of lustre-reviews) need to be able to build with the same version of OFA OFED.

Currently in lustre/kernel_patches/targets, each target specifies either a version of OFA OFED to build or "inkernel" in the OFED_VERSION variable. This support needs to be extended such that the OFED_VERSION variable in the target file always specifies the version of OFA OFED to build for the given kernel and a new variable should be created to specify whether that target defaults/prefers OFA OFED or inkernel (i.e. in absence of any explicit directive to lbuild).

With those changes, Jenkins should be able to instruct lbuild to simply build with either inkernel OFED or OFA OFED (i.e. and not an OFA OFED version) and leave it up to the target file to specify which version of OFA OFED should be built.

This ticket is for the lbuild changes. TT-351 is for the Jenkins changes to use the enhancement done in this ticket.



 Comments   
Comment by Minh Diep [ 17/Mar/12 ]

TT-351 is now TT-456

Comment by Minh Diep [ 06/Apr/12 ]

actually, the codes to support this is already there

echo "Loading target config file $TARGET.target..."

  1. if the caller specified an OFED_VERSION it should override whatever
  2. the target file specifies
    local env_OFED_VERSION="$OFED_VERSION"

. "$TARGET_FILE"

if [ -n "$env_OFED_VERSION" ]; then
OFED_VERSION="$env_OFED_VERSION"
fi

so if caller does not use --ofed-version option, it will use the target file's OFED_VERSION which need to update

2.6-oel5.target:OFED_VERSION=inkernel
2.6-oel5.target.in:OFED_VERSION=inkernel
2.6-rhel5.target:OFED_VERSION=inkernel
2.6-rhel5.target.in:OFED_VERSION=inkernel
2.6-rhel6.target:OFED_VERSION=inkernel
2.6-rhel6.target.in:OFED_VERSION=inkernel
2.6-sles10.target:OFED_VERSION=inkernel
2.6-sles10.target:OFED_DEVEL_VERSION="1.4.2-0.8.4.1682.0.PTF.578796"
2.6-sles10.target.in:OFED_VERSION=inkernel
2.6-sles10.target.in:OFED_DEVEL_VERSION="1.4.2-0.8.4.1682.0.PTF.578796"
2.6-sles11.target:OFED_VERSION=inkernel
2.6-sles11.target.in:OFED_VERSION=inkernel

Comment by Minh Diep [ 10/Apr/12 ]

patch to update target files: http://review.whamcloud.com/#change,2501

Comment by Brian Murrell (Inactive) [ 13/Apr/12 ]

I'm not sure the existing code does support all of the use-cases/requirements.

First requirement is that the caller (of lbuild) needs to be able to instruct whether to build with OFA (where available) or whether to use the kernel supplied I/B stack (to support testing one or the other).

Second requirement is that each platform needs to be able to express whether, unless overridden by the caller, it should use a kernel supplied I/B stack or it should use an externally built OFED (perhaps not all vendors supply an in-kernel I/B stack).

Third requirement is for the latter case of the second requirement, a version of OFED needs to be specifiable (perhaps not all platforms can use the same/latest version of OFED).

As far as I can see, a single OFED_VERSION variable is unable to achieve all three of these requirements.

Do you disagree on either the list of requirements or that a single variable cannot achieve them all?

Comment by Minh Diep [ 30/Apr/12 ]

Let me see I get this right. Here are a few scenarios

1. lbuild does not specify --ofed-version
This means we will build on whatever being OFED_VERSION in the target file, could be "in-kernel" or "x.x.x"

2. lbuild specifiy --ofed-version
This means we will build on whatever being set in --ofed-version, could be "in-kernel" or "x.x.x"

As for the third requirement, shouldn't we be able to use #1 which to set the target file and lbuild should not use --ofed-version option

We may need to modify lbuild to ensure above #1 and #2 work, but I think these cover all requirement. Please let me know if I miss something here.

Comment by Brian Murrell (Inactive) [ 30/Apr/12 ]

Perhaps you are right and the only thing that needs changing is the argument to lbuild so that rather than saying which version of OFED it's simply a toggle for OFED/in-kernel.

TBH, I'm not quite sure what the requirements are from the build/release team. Maybe the above satisfies all current requirements.

Comment by Minh Diep [ 30/Apr/12 ]

The goal here is to prevent changing jenkins run script whenever we update to new ofed version. However, jenkins run script still needs to enforce the correct build according to whether it's lustre-review or lustre-master. This means in some cases, lbuild/jenkins will force to in-kernel and ignore the target file; which I think is fine.

Comment by Brian Murrell (Inactive) [ 30/Apr/12 ]

I was wrong in my previous comment. Two variables are needed.

The goal here is to prevent changing jenkins run script whenever we update to new ofed version.

And handle the fact that not every distro will simultaneously be supported a single release of OFED.

This is why you need two variables. You need one that specifies for the target which version of OFED is supported. But you need a second variable to specify what the default/preferred mode (OFED/inkernel) is for the target.

Jenkins (or any lbuild caller) then simply states which kind of build it wants (OFED/inkernel) with a command line switch which (possibly, if supported by the target) overrides the "preferred mode" setting.

Probably the detail you were not considering is the need for each target to specify the version of OFED it is supported with. If you consider that, do you still think only one variable is necessary?

Comment by Minh Diep [ 03/Oct/17 ]

latest version of lbuild should be efficient to do what we need. 

Generated at Sat Feb 10 01:12:47 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.