forked from openshift/machine-config-operator
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCPBUGS-10787: Persist static IP addressed NIC names from rhel8
When upgrading rhel8 -> rhel9, some NIC names may change; e.g. the `mlx5` driver started emitting port information. This breaks static IP addressing which references those interfaces. We're going to land code in nmstate to address this; see nmstate/nmstate#2301 - For a few reasons; one is that this isn't an OCP specific problem - nmstate is in Rust - nmstate already parses network interface information - Adding more glue into the MCO is undesirable However...to solve the bootstrap problem here in that we don't have this nmstate code on 4.12, add it to the MCD binary.
- Loading branch information
Showing
7 changed files
with
119 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
# THIS FILE IS GENERATED FROM Dockerfile DO NOT EDIT | ||
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.13 AS builder | ||
ARG TAGS="" | ||
WORKDIR /go/src/github.com/openshift/machine-config-operator | ||
COPY . . | ||
# FIXME once we can depend on a new enough host that supports globs for COPY, | ||
# just use that. For now we work around this by copying a tarball. | ||
RUN make install DESTDIR=./instroot && tar -C instroot -cf instroot.tar . | ||
|
||
FROM registry.ci.openshift.org/ocp/4.13:base | ||
ARG TAGS="" | ||
COPY --from=builder /go/src/github.com/openshift/machine-config-operator/instroot.tar /tmp/instroot.tar | ||
RUN cd / && tar xf /tmp/instroot.tar && rm -f /tmp/instroot.tar | ||
COPY install /manifests | ||
RUN if ! rpm -q util-linux; then yum install -y util-linux && yum clean all && rm -rf /var/cache/yum/*; fi | ||
|
||
RUN if [[ "${TAGS}" == "fcos" ]] || [[ "${TAGS}" == "scos" ]]; then \ | ||
# comment out non-base/extensions image-references entirely for fcos/scos | ||
sed -i '/- name: rhel-coreos-/,+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/fedora-coreos/g' /manifests/*; \ | ||
elif [[ "${TAGS}" == "scos" ]]; then sed -i 's/rhel-coreos/centos-stream-coreos-9/g' /manifests/*; fi && \ | ||
if ! rpm -q util-linux; then dnf install -y util-linux; fi && dnf -y install 'nmstate > 2.2' && dnf clean all && rm -rf /var/cache/dnf/* | ||
COPY templates /etc/mcc/templates | ||
ENTRYPOINT ["/usr/bin/machine-config-operator"] | ||
LABEL io.openshift.release.operator true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters