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

[rhcos-4.16] tests/kola: use FCOS defined fedora-archive.repo to set up containers #3140

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

marmijo
Copy link
Member

@marmijo marmijo commented Sep 4, 2024

This is a backport of: #3061

  • 4853041 (tests/ntp: use the FCOS defined fedora.repo to set up container)
  • b9f3487 (tests/podman/rootless-systemd: use the FCOS defined fedora.repo to set up container)

There are two tests that use the fedora container to set up and run the test environment. Use the fedora.repo file defined in fedora-coreos-config to set up that container. This will force packages to be downloaded from dl.fedoraproject.org, as specified in the FCOS file. The ITUP cluster, being used by the RHCOS pipeline, requires all outbound connections to be specified in a Firewall Egress file, and this will ensure the same connection will always be used.


This is also a backport of #3146

The fedora-archive.repo file now contains both EOL and non-EOL repo locations[1]. This means we can change the two kola tests that use the fedora container to use fedora-archive.repo as the only repo configuration file. This reduces the maintenance burden because now we don't have to change this curl statement when fedora versions reach EOL.

marmijo and others added 2 commits September 4, 2024 16:45
Use the fedora.repo file defined in fedora-coreos-config to set up the
container. This will force packages to be downloaded from
dl.fedoraproject.org, as specified in the FCOS file. The ITUP cluster,
being used by the RHCOS pipeline, requires all outbound connections
to be specified in a Firewall Egress file, and this will ensure the
same connection will always be used.

Co-authored-by: Aashish Radhakrishnan <aaradhak@redhat.com>
…t up container

Use the fedora.repo file defined in fedora-coreos-config to set up the
container. This will force packages to be downloaded from
dl.fedoraproject.org, as specified in the FCOS file. The ITUP cluster,
being used by the RHCOS pipeline, requires all outbound connections
to be specified in a Firewall Egress file, and this will ensure the
same connection will always be used.

Co-authored-by: Aashish Radhakrishnan <aaradhak@redhat.com>
@dustymabe
Copy link
Member

dustymabe commented Sep 5, 2024

We should consider populating the archive repo here now as well.. I think it will just ignore it since no repo actually exists in those locations, but it future proofs us from having to add it later.

If it does work we should update the files in the testing-devel branch and add that change to the backport here for 4.15 and 4.16.

@marmijo
Copy link
Member Author

marmijo commented Sep 5, 2024

We should consider populating the archive repo here now as well.. I think it will just ignore it since no repo actually exists in those locations, but it future proofs us from having to add it later.

I tested this in the ITUP cluster and dnf failed because the repo metadata does not exist in the archive location for F40. I was able to get it to work by setting skip_if_unavailable=True in fedora-archive.repo, but we'd have to do that for fedora.repo as well to avoid that issue when F40 content is archived, and I'm sure that has broader implications.

@dustymabe
Copy link
Member

dustymabe commented Sep 5, 2024

but we'd have to do that for fedora.repo as well

I think I'd be fine with that since we already define our own fedora.repo. cc @jlebon

i.e. I don't think there should be a case where neither of them are available.

@jlebon
Copy link
Member

jlebon commented Sep 5, 2024

Instead of skip_if_unavailable, we can also set multiple baseurls instead. See e.g.

baseurl=https://dl.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
https://dl.fedoraproject.org/pub/fedora-secondary/releases/$releasever/Everything/$basearch/os/
.

The advantage of this is that it succeeds if at least one of the two is valid, otherwise it fails. skip_if_unavailable in general in CI systems is not great because it means that you can get non-deterministic results.

Edit: to clarify, what I'm suggesting here is to have the baseurls in the fedora-archive.repo be e.g.:

baseurl=https://dl.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
        https://dl.fedoraproject.org/pub/fedora-secondary/releases/$releasever/Everything/$basearch/os/
        https://dl.fedoraproject.org/pub/archive/fedora/linux/releases/$releasever/Everything/$basearch/os/
        https://dl.fedoraproject.org/pub/archive/fedora-secondary/releases/$releasever/Everything/$basearch/os/

@marmijo
Copy link
Member Author

marmijo commented Sep 5, 2024

Edit: to clarify, what I'm suggesting here is to have the baseurls in the fedora-archive.repo be e.g.:

So in that case, we would only use fedora-archive.repo for the two kola tests and the extensions container (and any other future use of the fedora container)? Otherwise we'd still hit the issue where, once e.g. F40 content is archived, then dnf will fail on fedora.repo.

@marmijo
Copy link
Member Author

marmijo commented Sep 5, 2024

I opened #3145 to handle that.

@marmijo
Copy link
Member Author

marmijo commented Sep 5, 2024

/hold
I'll rework this PR to include #3146, which resulted from #3145

The `fedora-archive.repo` file now contains both EOL and non-EOL repo
locations[1]. This means we can change the two kola tests that use the
fedora container to use `fedora-archive.repo` as the only repo
configuration file. This reduces the maintenance burden because now we
don't have to change this curl statement when fedora versions reach EOL.

[1] coreos#3145
@marmijo marmijo changed the title [rhcos-4.16] tests/kola: use FCOS defined fedora.repo to set up containers [rhcos-4.16] tests/kola: use FCOS defined fedora-archive.repo to set up containers Sep 5, 2024
@marmijo
Copy link
Member Author

marmijo commented Sep 5, 2024

/unhold
this is ready for review

@marmijo marmijo removed the hold label Sep 5, 2024
@marmijo marmijo requested a review from dustymabe September 5, 2024 22:32
Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

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

LGTM

@marmijo marmijo merged commit 1d43549 into coreos:rhcos-4.16 Sep 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants