From 9846f7435775ccfbc3d3c514563560a04f17f375 Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Wed, 20 Dec 2023 11:10:16 -0600 Subject: [PATCH 1/2] fix: run depmod after installing ZFS RPMs With zfs 2.1.x, depmod ran automatically. Though unclear why, it no longer seems to occur when installing zfs 2.2.x RPMs in a container build (it does still work automatically on a non image-based Fedora system). Manually running depmod, as in this commit, ensures the 2.2.x kmods load as expected. --- fedora-coreos/install.sh | 3 +++ main/install.sh | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/fedora-coreos/install.sh b/fedora-coreos/install.sh index a67947d..3554b8b 100755 --- a/fedora-coreos/install.sh +++ b/fedora-coreos/install.sh @@ -3,6 +3,7 @@ set -ouex pipefail RELEASE="$(rpm -E %fedora)" +KERNEL="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" #### PREPARE # enable testing repos if not enabled on testing stream @@ -25,6 +26,8 @@ find /tmp/rpms/ ## CONDITIONAL: install ZFS (and sanoid deps) if [[ "-zfs" == "${ZFS_TAG}" ]]; then rpm-ostree install pv /tmp/rpms/zfs/*.rpm + # for some reason depmod ran automatically with zfs 2.1 but not with 2.2 + depmod -A ${KERNEL} fi ## CONDITIONAL: install NVIDIA diff --git a/main/install.sh b/main/install.sh index 05bc81e..e7aedc8 100755 --- a/main/install.sh +++ b/main/install.sh @@ -2,6 +2,7 @@ set -ouex pipefail +KERNEL="$(rpm -q kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')" RELEASE="$(rpm -E %fedora)" #### PREPARE @@ -22,6 +23,7 @@ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-cisco-openh264.repo # inspect to see what RPMS we copied in find /tmp/rpms/ + ## CONDITIONAL: install ZFS (and sanoid deps) if [[ "-zfs" == "${ZFS_TAG}" ]]; then rpm-ostree install /tmp/rpms/zfs/*.rpm \ @@ -32,6 +34,8 @@ if [[ "-zfs" == "${ZFS_TAG}" ]]; then perl-Config-IniFiles \ perl-Getopt-Long \ pv + # for some reason depmod ran automatically with zfs 2.1 but not with 2.2 + depmod -A ${KERNEL} fi ## CONDITIONAL: install NVIDIA From f95763315c9c6eabc6400fe84c645105d31e5b9c Mon Sep 17 00:00:00 2001 From: Benjamin Sherman Date: Wed, 20 Dec 2023 11:33:11 -0600 Subject: [PATCH 2/2] docs: reflect zfs 2.2 change --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f87e4ac..7e87e26 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ A generic [Fedora CoreOS image](https://quay.io/repository/fedora/fedora-coreos? - [nvidia-container-toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/sample-workload.html) - latest toolkit which supports both root and rootless podman containers and CDI - [nvidia container selinux policy](https://github.com/NVIDIA/dgx-selinux/tree/master/src/nvidia-container-selinux) - allows using `--security-opt label=type:nvidia_container_t` for some jobs (some will still need `--security-opt label=disable` as suggested by nvidia) - [ZFS versions](#tag-matrix) add: - - [ZFS driver](https://github.com/ublue-os/ucore-kmods) - latest driver (currently pinned to 2.1.x series) + - [ZFS driver](https://github.com/ublue-os/ucore-kmods) - latest driver (currently pinned to 2.2.x series) *NOTE: currently, zincati fails to start on systems with OCI based deployments (like uCore). Upstream efforts are active to correct this.* @@ -48,7 +48,7 @@ Suitable for running containerized workloads on either baremetal or virtual mach - [nvidia container selinux policy](https://github.com/NVIDIA/dgx-selinux/tree/master/src/nvidia-container-selinux) - allows using `--security-opt label=type:nvidia_container_t` for some jobs (some will still need `--security-opt label=disable` as suggested by nvidia) - Optional [ZFS versions](#tag-matrix) add: - [sanoid/syncoid dependencies](https://github.com/jimsalterjrs/sanoid) - [see below](#zfs) for details - - [ZFS driver](https://github.com/ublue-os/ucore-kmods) - latest driver (currently pinned to 2.1.x series) + - [ZFS driver](https://github.com/ublue-os/ucore-kmods) - latest driver (currently pinned to 2.2.x series) - Enables staging of automatic system updates via rpm-ostreed - Enables password based SSH auth (required for locally running cockpit web interface) - Disables Zincati auto upgrade/reboot service