openshift / os

89 stars 105 forks source link

NO-JIRA: tests/replace-rt-kernel: fix and improve #1506

Closed jlebon closed 1 month ago

jlebon commented 1 month ago

It's a bit odd to have this test pull the c9s.repo yum repo from the master branch of openshift/os. We don't want to be in a situation where a change in master breaks older branches.

But also, c9s.repo could at any point in time refer to either the latest compose output or the official mirrors. But we always want to use the official mirrors for this test since that has multiple package versions and we need to be able to select a kernel version which is not equal to ours.

We could curl the official centos.repo file (and actually, in the SCOS case, it's already in the image), but that file doesn't include additional repos like rt and nfv which we need for our test.

Instead, just bake the config into the test data. That way we don't need to curl anything at all, and the repo definition is naturally bound to the test and can be modified together atomically.

A few additional changes:

  1. only do all the repo preparations stuff on the first boot
  2. add logic to pick a kernel that's different from the one we're on if we're already CentOS-based (this fixes #1383)
  3. add a stub for c10s for when we're ready

Closes: #1383

jlebon commented 1 month ago

I've tested this on master (RHCOS and SCOS variants), release-4.15 (RHCOS), and release-4.14 (RHCOS).

jmarrero commented 1 month ago

/lgtm /approve

openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dustymabe, jlebon, jmarrero

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift/os/blob/master/OWNERS)~~ [dustymabe,jlebon,jmarrero] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
openshift-ci[bot] commented 1 month ago

@jlebon: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
openshift-ci-robot commented 1 month ago

@jlebon: This pull request explicitly references no jira issue.

In response to [this](https://github.com/openshift/os/pull/1506): >It's a bit odd to have this test pull the `c9s.repo` yum repo from the >master branch of openshift/os. We don't want to be in a situation where >a change in master breaks older branches. > >But also, `c9s.repo` could at any point in time refer to either the >latest compose output or the official mirrors. But we always want to >use the official mirrors for this test since that has multiple package >versions and we need to be able to select a kernel version which is not >equal to ours. > >We could curl the official `centos.repo` file (and actually, in the >SCOS case, it's already in the image), but that file doesn't include >additional repos like `rt` and `nfv` which we need for our test. > >Instead, just bake the config into the test data. That way we don't need >to curl anything at all, and the repo definition is naturally bound to >the test and can be modified together atomically. > >A few additional changes: >1. only do all the repo preparations stuff on the first boot >2. add logic to pick a kernel that's different from the one we're on if > we're already CentOS-based (this fixes #1383) >3. add a stub for c10s for when we're ready > >Closes: #1383 > > Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fos). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
jlebon commented 1 month ago

/cherrypick release-4.15 release 4.14

openshift-cherrypick-robot commented 1 month ago

@jlebon: #1506 failed to apply on top of branch "release-4.15":

Applying: denylist: drop ext.config.rpm-ostree.replace-rt-kernel
Using index info to reconstruct a base tree...
M   kola-denylist.yaml
Falling back to patching base and 3-way merge...
Auto-merging kola-denylist.yaml
CONFLICT (content): Merge conflict in kola-denylist.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 denylist: drop ext.config.rpm-ostree.replace-rt-kernel
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
In response to [this](https://github.com/openshift/os/pull/1506#issuecomment-2105233630): >/cherrypick release-4.15 release 4.14 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.