diff --git a/ci/prow-entrypoint.sh b/ci/prow-entrypoint.sh index ced382e6..db5876e1 100755 --- a/ci/prow-entrypoint.sh +++ b/ci/prow-entrypoint.sh @@ -264,12 +264,16 @@ main () { kola_test_metal ;; "rhcos-92-build-test-qemu"|"rhcos-90-build-test-qemu") + echo "FIXME skipped until we have updated mirrors in Prow" + exit 0 setup_user cosa_init "rhel-coreos-9" cosa_build kola_test_qemu ;; "rhcos-92-build-test-metal"|"rhcos-90-build-test-metal") + echo "FIXME skipped until we have updated mirrors in Prow" + exit 0 setup_user cosa_init "rhel-coreos-9" cosa_build diff --git a/common.yaml b/common.yaml index 337cb872..8f4c8291 100644 --- a/common.yaml +++ b/common.yaml @@ -22,6 +22,7 @@ ostree-layers: - overlay/20platform-chrony - overlay/21dhcp-chrony - overlay/25azure-udev-rules + - overlay/30rhcos-nvme-compat-udev arch-include: x86_64: diff --git a/overlay.d/30rhcos-nvme-compat-udev/statoverride b/overlay.d/30rhcos-nvme-compat-udev/statoverride new file mode 100644 index 00000000..27a95aff --- /dev/null +++ b/overlay.d/30rhcos-nvme-compat-udev/statoverride @@ -0,0 +1,2 @@ +# Config file for overriding permission bits on overlay files/dirs +# Format: = diff --git a/overlay.d/30rhcos-nvme-compat-udev/usr/lib/dracut/modules.d/30rhcos-nvme-compat-udev/module-setup.sh b/overlay.d/30rhcos-nvme-compat-udev/usr/lib/dracut/modules.d/30rhcos-nvme-compat-udev/module-setup.sh new file mode 100644 index 00000000..687c813a --- /dev/null +++ b/overlay.d/30rhcos-nvme-compat-udev/usr/lib/dracut/modules.d/30rhcos-nvme-compat-udev/module-setup.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# NVMe by-id/ symlinks changed wrt leading spaces from RHEL8 to RHEL9: +# https://issues.redhat.com/browse/OCPBUGS-11375 +# https://github.com/systemd/systemd/issues/27155 + +# This rule adds back the previous symlinks for backwards compatibility. We want +# it in the initramfs in case there are Ignition configs which referenced the +# old symlinks. + +install() { + inst_multiple /usr/lib/udev/rules.d/61-persistent-storage-nvme-compat.rules +} diff --git a/overlay.d/30rhcos-nvme-compat-udev/usr/lib/udev/rules.d/61-persistent-storage-nvme-compat.rules b/overlay.d/30rhcos-nvme-compat-udev/usr/lib/udev/rules.d/61-persistent-storage-nvme-compat.rules new file mode 100644 index 00000000..3bb652b2 --- /dev/null +++ b/overlay.d/30rhcos-nvme-compat-udev/usr/lib/udev/rules.d/61-persistent-storage-nvme-compat.rules @@ -0,0 +1,20 @@ +# NVMe by-id/ symlinks changed wrt leading spaces from RHEL8 to RHEL9: +# https://issues.redhat.com/browse/OCPBUGS-11375 +# https://github.com/systemd/systemd/issues/27155 + +# This rule adds back the previous symlinks for backwards compatibility. + +# They're the same as the regular rules in 60-persistent-storage.rules, except +# they don't include the `OPTIONS="string_escape=replace"` directive. + +ACTION=="remove", GOTO="persistent_storage_nvme_compat_end" +ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_nvme_compat_end" +SUBSYSTEM!="block", GOTO="persistent_storage_nvme_compat_end" + +KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", \ + ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}" + +KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", \ + ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}-part%n" + +LABEL="persistent_storage_nvme_compat_end" diff --git a/overlay.d/README.md b/overlay.d/README.md index af1d85e1..c5af92a0 100644 --- a/overlay.d/README.md +++ b/overlay.d/README.md @@ -39,9 +39,23 @@ lands in downstream packages. See upstream thread: https://listengine.tuxfamily.org/chrony.tuxfamily.org/chrony-dev/2020/05/msg00022.html 25rhcos-azure-udev -------------- +------------------ We want to provide Azure udev rules as part of the initrd, so that Ignition is able to detect disks and act on them. The WALinuxAgent-udev has been changed to install udev rules into the initramfs, but that change isn't in el8 yet. This can be dropped when moving to el9. + +30rhcos-nvme-compat-udev +------------------------ + +NVMe by-id/ symlinks changed wrt leading spaces from RHEL8 to RHEL9: +https://issues.redhat.com/browse/OCPBUGS-11375 +https://github.com/systemd/systemd/issues/27155 + +This overlay ships a rule that adds back the previous symlinks for backwards +compatibility. TBD when we can drop this, e.g. by having layered software use +the `eui` links instead or pivoting to GPT partition UUIDs. Customers may have +also manually typed the old symlink in their Ignition configs and other k8s +resources though. Those would require some communication before we can rip this +out. \ No newline at end of file diff --git a/tests/kola/disk/nvme-compat-symlink b/tests/kola/disk/nvme-compat-symlink new file mode 100755 index 00000000..c7d985f2 --- /dev/null +++ b/tests/kola/disk/nvme-compat-symlink @@ -0,0 +1,29 @@ +#!/bin/bash +## kola: +## exclusive: true +## additionalDisks: ["1G:channel=nvme,serial= foobar"] +## platforms: qemu +## # qemu on s390x does not support nvme emulation +## architectures: "!s390x" +# +# By default coreos-generate-iscsi-initiatorname.service is active on RHCOS, +# inactive on FCOS +# https://github.com/openshift/os/pull/453 + +set -xeuo pipefail + +. $KOLA_EXT_DATA/commonlib.sh + +# the canonical symlink +s=/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_____foobar +if ! test -L "${s}"; then + fatal "missing canonical symlink ${s}" +fi + +# the compat symlink +s=/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl__foobar +if ! test -L "${s}"; then + fatal "missing compat symlink ${s}" +fi + +ok "nvme compat symlink"