Skip to content

Commit

Permalink
tests/kola: disable yum repos for kernel-replace test
Browse files Browse the repository at this point in the history
Even though all the rpms that we are replacing are local rpm-ostree
will still reach out to the repos during the operation. Let's just
disable all the repos to prevent this from happening.

This was causing issues in our RHCOS pipeline because we have more
strict egress rules there and it was trying to hit the CentOS mirrors
when testing on c9s since the yum repos are there in c9s by default.

xref: openshift/os#1673
  • Loading branch information
dustymabe committed Jan 29, 2025
1 parent 12cc9c5 commit 9954445
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/kola/rpm-ostree/kernel-replace
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ build_derived_ociarchive() {

cat > Containerfile << EOF
FROM $imagespec
# Disable yum repos since we are overriding local files and we don't
# want to reach out to the repos. This is done in a way such that if
# there are no repo files (i.e. like on RHCOS) then it succeeds anyway.
RUN ls /etc/yum.repos.d/*.repo 2>/dev/null | xargs --no-run-if-empty sed -i s/enabled=1/enabled=0/
RUN rpm-ostree override replace /tmp/buildcontext/*rpm && \
rpm-ostree cleanup -m && \
ostree container commit
Expand Down

0 comments on commit 9954445

Please sign in to comment.