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

bug: does not attempt online install if unnecessary #5169

Conversation

ricardomaraschini
Copy link
Member

What this PR does / why we need it:

if all dependency packages are already installed on the system we don't need to try to go and fetch them online. this pr disables all repos other than the local kurl one if all dependencies were already installed.

Which issue(s) this PR fixes:

Fixes #103780

Does this PR introduce a user-facing change?

Stop using default yum repos if all dependencies are already installed on RHEL 9.

if all dependency packages are already installed on the system we don't
need to try to go and fetch them online. this pr disables all repos
other than the local kurl one if all dependencies were already
installed.
@ricardomaraschini ricardomaraschini added type::bug Something isn't working bug::normal labels Apr 29, 2024
@ricardomaraschini ricardomaraschini requested a review from a team as a code owner April 29, 2024 14:03
Comment on lines 282 to 294
if [ -n "$KURL_USE_RHEL9_REMOTE_YUM_REPOS" ] ; then
if [[ "${packages[*]}" == *"containerd.io"* ]] ; then
yum install --allowerasing -y "${packages[@]}"
else
yum install -y "${packages[@]}"
fi
else
yum install -y "${packages[@]}"
if [[ "${packages[*]}" == *"containerd.io"* ]] ; then
yum install --disablerepo=* --enablerepo="$reponame" --allowerasing -y "${packages[@]}"
else
yum install --disablerepo=* --enablerepo="$reponame" -y "${packages[@]}"
fi
fi
Copy link
Member

Choose a reason for hiding this comment

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

Instead of adding this if block, can we pass an env var that either includes the --disablerepo=* flag or not?

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me know if this is what you meant.

@ricardomaraschini ricardomaraschini merged commit e1ab8cc into main Apr 29, 2024
7 checks passed
@ricardomaraschini ricardomaraschini deleted the ricardomaraschini/sc-103780/kurl-still-tries-to-install-containerd-on branch April 29, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug::normal type::bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants