From 3d7f3c1ce026aac7808d53e05a027f5240e2607f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 12 Jan 2023 15:35:40 -0500 Subject: [PATCH] Switch to rhel-coreos-9 ref: https://issues.redhat.com/browse/COS-1983 We introduced a new `rhel-coreos-9` to aid having a switch be an atomic operation. --- Dockerfile | 6 +++--- cmd/machine-config-operator/bootstrap.go | 6 +++--- docs/UsingLayering.md | 8 ++++---- .../0000_80_machine-config-operator_05_osimageurl.yaml | 4 ++-- install/image-references | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 90dfbab482..85d50f88a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,12 +14,12 @@ COPY install /manifests RUN if [[ "${TAGS}" == "fcos" ]] || [[ "${TAGS}" == "scos" ]]; then \ # comment out non-base/extensions image-references entirely for fcos/scos - sed -i '/- name: rhel-coreos-8-/,+3 s/^/#/' /manifests/image-references && \ + sed -i '/- name: rhel-coreos-[89]-/,+3 s/^/#/' /manifests/image-references && \ # also remove extensions from the osimageurl configmap (if we don't, oc won't rewrite it, and the placeholder value will survive and get used) sed -i '/baseOSExtensionsContainerImage:/ s/^/#/' /manifests/0000_80_machine-config-operator_05_osimageurl.yaml; fi && \ # rewrite image names for fcos/scos - if [[ "${TAGS}" == "fcos" ]]; then sed -i 's/rhel-coreos-8/fedora-coreos/g' /manifests/*; \ - elif [[ "${TAGS}" == "scos" ]]; then sed -i 's/rhel-coreos-8/centos-stream-coreos-9/g' /manifests/*; fi && \ + if [[ "${TAGS}" == "fcos" ]]; then sed -i 's/rhel-coreos-9/fedora-coreos/g' /manifests/*; \ + elif [[ "${TAGS}" == "scos" ]]; then sed -i 's/rhel-coreos-9/centos-stream-coreos-9/g' /manifests/*; fi && \ if ! rpm -q util-linux; then yum install -y util-linux && yum clean all && rm -rf /var/cache/yum/*; fi COPY templates /etc/mcc/templates ENTRYPOINT ["/usr/bin/machine-config-operator"] diff --git a/cmd/machine-config-operator/bootstrap.go b/cmd/machine-config-operator/bootstrap.go index a9f7c0aa27..2612681fda 100644 --- a/cmd/machine-config-operator/bootstrap.go +++ b/cmd/machine-config-operator/bootstrap.go @@ -79,8 +79,8 @@ func init() { bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.haproxyImage, "haproxy-image", "", "Image for haproxy.") bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.baremetalRuntimeCfgImage, "baremetal-runtimecfg-image", "", "Image for baremetal-runtimecfg.") bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.oauthProxyImage, "oauth-proxy-image", "", "Image for origin oauth proxy.") - bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.baseOSContainerImage, "baseos-image", "", "Image for rhel-coreos-8") - bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.baseOSExtensionsContainerImage, "baseos-extensions-image", "", "Image for rhel-coreos-8-extensions") + bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.baseOSContainerImage, "baseos-image", "", "ostree-bootable container image reference") + bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.baseOSExtensionsContainerImage, "baseos-extensions-image", "", "Image with extensions") bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.imageReferences, "image-references", "", "File containing imagestreams (from cluster-version-operator)") bootstrapCmd.PersistentFlags().StringVar(&bootstrapOpts.cloudProviderCAFile, "cloud-provider-ca-file", "", "path to cloud provider CA certificate") @@ -114,7 +114,7 @@ func runBootstrapCmd(cmd *cobra.Command, args []string) { // To help debugging, immediately log version glog.Infof("Version: %+v (%s)", version.Raw, version.Hash) - baseOSContainerImageTag := "rhel-coreos-8" + baseOSContainerImageTag := "rhel-coreos-9" if version.IsFCOS() { baseOSContainerImageTag = "fedora-coreos" } else if version.IsSCOS() { diff --git a/docs/UsingLayering.md b/docs/UsingLayering.md index 3118a3ca9e..0b19c4c512 100644 --- a/docs/UsingLayering.md +++ b/docs/UsingLayering.md @@ -8,8 +8,8 @@ Layering lets you "layer" additional content on top of a Base OS Image using "co As of 4.12: -- The MCO uses the `rhel-coreos-8` [native format](https://coreos.github.io/rpm-ostree/container/) base OS image by default instead of `machine-os-content` -- You can "layer" user content on top of that `rhel-coreos-8` image using a container build, and that content will be applied during a rebase +- The MCO uses the `rhel-coreos-8` [native format](https://coreos.github.io/rpm-ostree/container/) base OS image by default instead of `machine-os-content` (and in 4.13+, the image is `rhel-coreos-9`) +- You can "layer" user content on top of that `rhel-coreos-9` image using a container build, and that content will be applied during a rebase - The MCO will allow `OSImageURL` to be overridden *on a per-pool basis* with such an layered image While layering is powerful, it's also an "advanced" use of the MCO, and it comes with some trade-offs. @@ -36,13 +36,13 @@ Nothing will stop you at this point from using a completely arbitrary image, but #### On an existing cluster ```bash -oc adm release info --image-for rhel-coreos-8 +oc adm release info --image-for rhel-coreos-9 ``` #### Or before you build your cluster ```bash -oc adm release info --image-for rhel-coreos-8 quay.io/openshift-release-dev/ocp-release:your_release_here +oc adm release info --image-for rhel-coreos-9 quay.io/openshift-release-dev/ocp-release:your_release_here ``` ### 2. "Layer" Some Content On Top Of It diff --git a/install/0000_80_machine-config-operator_05_osimageurl.yaml b/install/0000_80_machine-config-operator_05_osimageurl.yaml index bf49ba613b..dc0f402703 100644 --- a/install/0000_80_machine-config-operator_05_osimageurl.yaml +++ b/install/0000_80_machine-config-operator_05_osimageurl.yaml @@ -11,8 +11,8 @@ data: releaseVersion: 0.0.1-snapshot # This (will eventually) replace the below when https://github.com/openshift/enhancements/pull/1032 # progresses towards the default. - baseOSContainerImage: "placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-8" - baseOSExtensionsContainerImage: "placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-8-extensions" + baseOSContainerImage: "placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-9" + baseOSExtensionsContainerImage: "placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-9-extensions" # The OS payload used for 4.10 and below; more information in # https://github.com/openshift/machine-config-operator/blob/master/docs/OSUpgrades.md # (The original issue was https://github.com/openshift/machine-config-operator/issues/183 ) diff --git a/install/image-references b/install/image-references index 4170492251..a71a6f952d 100644 --- a/install/image-references +++ b/install/image-references @@ -23,14 +23,14 @@ spec: from: kind: DockerImage name: placeholder.url.oc.will.replace.this.org/placeholdernamespace:machine-os-content - - name: rhel-coreos-8 + - name: rhel-coreos-9 from: kind: DockerImage - name: placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-8 - - name: rhel-coreos-8-extensions + name: placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-9 + - name: rhel-coreos-9-extensions from: kind: DockerImage - name: placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-8-extensions + name: placeholder.url.oc.will.replace.this.org/placeholdernamespace:rhel-coreos-9-extensions - name: keepalived-ipfailover from: kind: DockerImage