Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More consistent platform priority #1302

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions cvmfs/alienv
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ case $distro_name in
;;
8*)
distro_xrelease=8.x
platform=el7
platform=el8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is now on CVMFS.

;;
9*)
distro_xrelease=8.x
Expand Down Expand Up @@ -303,9 +303,15 @@ alien="AliEn"

# We cannot cross-pick pacakages among different platforms but we have to
# pick all packages consistently from a certain platform tree. When listing
# packages we show them all, when we load a package e define a priority list and
# packages we show them all, when we load a package we define a priority list and
# we always have a fallback for backward compatibility.
PLATFORM_PRIORITY="el9-$uname_m el7-$uname_m el6-$uname_m el5-$uname_m el8-$uname_m"

# The above priority is a general search priority. However, given a platform, we should actually
# start searching for software matching this precise platform and only later fall back to other
# platforms. This prevents loading el9 or el7 software, when I am actually on el8 (and el8 software is available).
PLATFORM_PRIORITY="${platform}-$uname_m ${PLATFORM_PRIORITY//${platform}-$uname_m/}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can this happen? We should never have O2 / O2Physics tags for different architectures with the same name.

Copy link
Author

@sawenzel sawenzel May 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand your question (but I suppose that we might in fact have the same name on different arches). This line fixes this problem mentioned above: "alienv executed inside el8 container loads el7 software, inconsistent with the choice of el8 container ... and despite the fact that el8 software A is actually available."

The fix is simply to look first of all if we have software for el8 ... instead of loading the el7 one simply because it is higher up the list. Refining the search list seems a reasonable thing to do and I don't see what might speak against this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a reproducer:

ssh lxplus8.cern.ch
/cvmfs/alice.cern.ch/bin/alienv enter O2sim::async-2023-pp-apass3-20240320.1-1


ARGS=("$@")
PACKAGES=
EXPECT_PACKAGES=
Expand Down
Loading