COS-2692: Add new variants to enable pure CentOS Stream/RHEL CoreOS builds, add Containerfile for layered OKD/OCP builds#1445
Conversation
|
Skipping CI for Draft Pull Request. |
This is part of openshift/os#1445.
This is part of openshift/os#1445. Those tests are all actually testing OCP components. In the new model, they should be run against an OCP layered image instead.
We don't have to be super strict here in how we find the bootloader entry. There should only be one, so simplify the logic using a glob instead. Motivated by the fact that this will break otherwise as part of openshift/os#1445 where the `ID` will be `centos`, but the stateroot will still be `scos`.
The `ID` will change to `centos` as part of openshift/os#1445.
|
The major gap left for this is adapting the pipeline to build the layered OCP image. |
|
/cc @lmzuccarelli @aguidirh @sherine-k |
We don't have to be super strict here in how we find the bootloader entry. There should only be one, so simplify the logic using a glob instead. Motivated by the fact that this will break otherwise as part of openshift/os#1445 where the `ID` will be `centos`, but the stateroot will still be `scos`.
The `ID` will change to `centos` as part of openshift/os#1445.
cgwalters
left a comment
There was a problem hiding this comment.
Just skimming, LGTM at a high level
This is part of openshift/os#1445. Those tests are all actually testing OCP components. In the new model, they should be run against an OCP layered image instead. Add a tag on them so that we'll be able to run them separately.
|
@jlebon: This pull request references COS-2692 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
This is part of openshift/os#1445. Those tests are all actually testing OCP components. In the new model, they should be run against an OCP layered image instead. Add a tag on them so that we'll be able to run them separately.
|
/refresh |
To make introducing the base RHCOS/SCOS images safer, let's create two new variants: `okd-c9s` and `ocp-rhel-9.4`. These variants are cloned from the existing `c9s` and `rhel-9.4` variants to start. The new variants will track the status quo: building SCOS/RHCOS with the OpenShift components baked in (hence the `okd`/`ocp` prefixes). This is what the pipeline will keep building. Meanwhile, what is currently the `c9s` and rhel-9.4` variants will become the new base SCOS/RHCOS streams containing *purely* CentOS Stream/RHEL content. The default variant is still `ocp-rhel-9.4` for now.
3aad6fe to
05ab4e8
Compare
This is the second step now in this switcheroo dance (see previous commit). We make the `c9s` and `rhel-9.4` variants contain only C9S/ RHEL 9.4 content and then make the `okd-c9s` and `ocp-rhel-9.4` variants inherit from those and add the OCP-specific stuff.
This Containerfile allows us to build the OpenShift node image on top of the base RHCOS/SCOS image (i.e. built from the `c9s` or `rhel-9.4` image). Currently, the resulting image is at parity with the base image you'd get from building the `okd-c9s` or `ocp-rhel-9.4` variant. In the future, those variants will go away and this will become the only way to build the node image. Part of: openshift#799
| license: MIT | ||
| name: rhcos | ||
| summary: OpenShift 4 | ||
| summary: RHEL CoreOS 9.4 |
There was a problem hiding this comment.
Nit: Red Hat Enterprise Linux CoreOS 9.4
There was a problem hiding this comment.
can stay as is as I don't think that's used anywhere.
|
Only have one note:
|
I though that this had been fixed already. This is weird but it's not due to this change so let's not hold it. /lgtm |
|
Feel free to unhold when you think it's ready to go / when we've completed the 4.16 branching. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, jlebon, travier The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Thanks for the review! |
|
I've filed #1519 |
|
@jlebon: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
A big part of the new variants added in openshift/os#1445 is that we only minimally modify `/etc/os-release`. This means that e.g. `ID` is still `rhel` and `VERSION_ID` is e.g. `9.4` for the `rhel-9.4` variant. We do still inject `VARIANT` and `VARIANT_ID` though. Adapt these library functions here to handle this.
A big part of the new variants added in openshift/os#1445 is that we only minimally modify `/etc/os-release`. This means that e.g. `ID` is still `rhel` and `VERSION_ID` is e.g. `9.4` for the `rhel-9.4` variant. We do still inject `VARIANT` and `VARIANT_ID` though. Adapt these library functions here to handle this.
As we introduced pure rhel and rhcos variants in [1], we did not change the `name` key in meta.json Kola uses this key to determine the distribution of the image to discriminate relevant tests. Some tests are tied to OCP content, e.g. `crio.base` and `crio.network` [2] and inherently won't work with the base because they rely on content that is added as part of the node image layer. Currently we skip the tests tagged with `openshift` in prow [3] and pipelie to work around this. Going with the principle of least disruption by adding `rhcos-base` rather than adding `rhcos-ocp` because all of the build already out there contains the old name and a I don't want to break compatibility if someone use a newer cosa to test those older builds. [1] openshift/os#1445 [2] https://github.com/coreos/coreos-assembler/blob/main/mantle/kola/tests/crio/crio.go [3] https://github.com/openshift/os/blob/48a18918794f5418352c03a3415fac3fde28e1b6/ci/prow-entrypoint.sh#L306 See openshift/os#1790
Add new
okd-c9sandocp-rhel-9.4variantsTo make introducing the base RHCOS/SCOS images safer, let's create two
new variants:
okd-c9sandocp-rhel-9.4. These variants are clonedfrom the existing
c9sandrhel-9.4variants to start.The new variants will track the status quo: building SCOS/RHCOS with the
OpenShift components baked in (hence the
okd/ocpprefixes). This iswhat the pipeline will keep building.
Meanwhile, what is currently the
c9sand rhel-9.4` variants willbecome the new base SCOS/RHCOS streams containing purely CentOS
Stream/RHEL content.
The default variant is still
ocp-rhel-9.4for now.Make c9s and rhel-9.4 variants be pure C9S/RHEL 9.4 content
This is the second step now in this switcheroo dance (see previous
commit). We make the
c9sandrhel-9.4variants contain only C9S/RHEL 9.4 content and then make the
okd-c9sandocp-rhel-9.4variantsinherit from those and add the OCP-specific stuff.
Containerfile: new file
This Containerfile allows us to build the OpenShift node image on top
of the base RHCOS/SCOS image (i.e. built from the
c9sorrhel-9.4image).
Currently, the resulting image is at parity with the base image you'd
get from building the
okd-c9sorocp-rhel-9.4variant. In thefuture, those variants will go away and this will become the only way to
build the node image.
Part of: #799