Include blkid bin in sriov-network-operator-config-daemon image and configure it properly #329

Merged
antaloala merged 1 commits from antaloala/Factory:edge-1773 into main 2025-12-11 12:39:26 +01:00
Owner
No description provided.
Author
Owner

This PR updates the sriov-network-operator-config-daemon-image's Dockerfile as follows:

This PR updates the sriov-network-operator-config-daemon-image's Dockerfile as follows: - Adds "util-linux" package; it provides the blkid command required in sriov-network-operator-config-daemon image (platform=openstack); see https://jira.suse.com/browse/SEL3-47 and related https://bugzilla.suse.com/show_bug.cgi?id=1247914 - CHKSTAT_ALLOW_INSECURE_MODE_IF_NO_PROC var setting is required when zypper-installing the "util-linux" package; see https://suse.slack.com/archives/C02AF8LALDA/p1729223703721189 (describes the problem) and https://suse.slack.com/archives/C02AF8LALDA/p1738062791106829?thread_ts=1729223703.721189&cid=C02AF8LALDA plus https://bugzilla.suse.com/show_bug.cgi?id=1219736#c54 (describe the solution, based on setting this env var) - Finally, to avoid blkid waiting on udev (which is not running in the container image), a proper blkid.conf file is needed; see https://bugzilla.suse.com/show_bug.cgi?id=1247914
eminguez reviewed 2025-12-11 11:31:37 +01:00
@@ -11,2 +11,4 @@
rm -rf /var/log/*
# Adding "util-linux" package; it provides the blkid command required in sriov-network-operator-config-daemon image (platform=openstack);
# see https://jira.suse.com/browse/SEL3-47?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel and related
Owner

I guess you can remove the arguments on the URL like: https://jira.suse.com/browse/SEL3-47

I guess you can remove the arguments on the URL like: https://jira.suse.com/browse/SEL3-47
eminguez marked this conversation as resolved
eminguez reviewed 2025-12-11 11:32:46 +01:00
@@ -13,0 +15,4 @@
# https://bugzilla.suse.com/show_bug.cgi?id=1247914
#
# CHKSTAT_ALLOW_INSECURE_MODE_IF_NO_PROC var setting is required when zypper-installing the "util-linux" package;
# see https://suse.slack.com/archives/C02AF8LALDA/p1729223703721189 (describes the problem) and
Owner

Not sure if we would like to link to slack or just the BZ

Not sure if we would like to link to slack or just the BZ
Author
Owner

I am removing all the slack links

I am removing all the slack links
eminguez marked this conversation as resolved
eminguez reviewed 2025-12-11 11:34:53 +01:00
@@ -13,0 +23,4 @@
# see https://bugzilla.suse.com/show_bug.cgi?id=1247914
#
RUN export CHKSTAT_ALLOW_INSECURE_MODE_IF_NO_PROC=1; \
zypper --installroot /installroot --non-interactive install --no-recommends util-linux; \
Owner

Stupid thing but perhaps you can put together the two export sentences (to help me with my OCD :D)

RUN export CHKSTAT_ALLOW_INSECURE_MODE_IF_NO_PROC=1; \
    export BLKID_CONF_TMP="/installroot/etc/blkid.conf"; \
    zypper --installroot /installroot --non-interactive install --no-recommends util-linux; \ 
    zypper -n clean; \
    rm -rf /var/log/*; \
    [ -e "${BLKID_CONF_TMP}" ] && sed -i -e 's/^EVALUATE=.*/EVALUATE=scan/g' ${BLKID_CONF_TMP} || echo "EVALUATE=scan" > ${BLKID_CONF_TMP}
Stupid thing but perhaps you can put together the two export sentences (to help me with my OCD :D) ``` RUN export CHKSTAT_ALLOW_INSECURE_MODE_IF_NO_PROC=1; \ export BLKID_CONF_TMP="/installroot/etc/blkid.conf"; \ zypper --installroot /installroot --non-interactive install --no-recommends util-linux; \ zypper -n clean; \ rm -rf /var/log/*; \ [ -e "${BLKID_CONF_TMP}" ] && sed -i -e 's/^EVALUATE=.*/EVALUATE=scan/g' ${BLKID_CONF_TMP} || echo "EVALUATE=scan" > ${BLKID_CONF_TMP} ```
Author
Owner

You are right (I forgot to do so after first splitting and later re-merging the different RUN commands).
Updating the Dockerfile as you propose (thanks).

You are right (I forgot to do so after first splitting and later re-merging the different RUN commands). Updating the Dockerfile as you propose (thanks).
eminguez marked this conversation as resolved
Author
Owner

Tests on new generated image passed (a summary included here below):

$ sudo podman pull registry.opensuse.org/isv/suse/edge/factory/staging/pr-329/images/sriov-network-config-daemon:v1.6.0
Trying to pull registry.opensuse.org/isv/suse/edge/factory/staging/pr-329/images/sriov-network-config-daemon:v1.6.0...
Getting image source signatures
Copying blob 28de74391b35 skipped: already exists  
Copying blob 9dbca3930e90 done   | 
Copying config dff03d04af done   | 
Writing manifest to image destination
dff03d04af803401e9c69ab156abb1eefba04f8bd4b64bb55ca547cf05937056

$ sudo podman run --rm -it --entrypoint="/bin/bash" --privileged -v /dev:/dev:rw registry.opensuse.org/isv/suse/edge/factory/staging/pr-329/images/sriov-network-config-daemon:v1.6.0
bash-5.2# blkid --version
blkid from util-linux 2.41.1  (libblkid 2.41.1, 24-Jun-2025)
bash-5.2# cat /etc/blkid.conf
EVALUATE=scan
bash-5.2# ls -lF /dev/disk/by-label
total 0
lrwxrwxrwx 1 root root 15 Dec 10 07:59 SYSTEM -> ../../nvme0n1p1
bash-5.2# blkid -l -t LABEL=SYSTEM -o device
/dev/nvme0n1p1
bash-5.2# echo $?
0
bash-5.2#
Tests on new generated image passed (a summary included here below): ``` $ sudo podman pull registry.opensuse.org/isv/suse/edge/factory/staging/pr-329/images/sriov-network-config-daemon:v1.6.0 Trying to pull registry.opensuse.org/isv/suse/edge/factory/staging/pr-329/images/sriov-network-config-daemon:v1.6.0... Getting image source signatures Copying blob 28de74391b35 skipped: already exists Copying blob 9dbca3930e90 done | Copying config dff03d04af done | Writing manifest to image destination dff03d04af803401e9c69ab156abb1eefba04f8bd4b64bb55ca547cf05937056 $ sudo podman run --rm -it --entrypoint="/bin/bash" --privileged -v /dev:/dev:rw registry.opensuse.org/isv/suse/edge/factory/staging/pr-329/images/sriov-network-config-daemon:v1.6.0 bash-5.2# blkid --version blkid from util-linux 2.41.1 (libblkid 2.41.1, 24-Jun-2025) bash-5.2# cat /etc/blkid.conf EVALUATE=scan bash-5.2# ls -lF /dev/disk/by-label total 0 lrwxrwxrwx 1 root root 15 Dec 10 07:59 SYSTEM -> ../../nvme0n1p1 bash-5.2# blkid -l -t LABEL=SYSTEM -o device /dev/nvme0n1p1 bash-5.2# echo $? 0 bash-5.2# ```
antaloala requested review from steven.hardy 2025-12-11 11:49:30 +01:00
antaloala force-pushed edge-1773 from eb54c2aee6 to d0aae6beec 2025-12-11 12:08:42 +01:00 Compare
antaloala force-pushed edge-1773 from d0aae6beec to bb39e4fbea 2025-12-11 12:12:50 +01:00 Compare
antaloala requested review from eminguez 2025-12-11 12:15:06 +01:00
antaloala changed title from WIP: Include blkid bin in sriov-network-operator-config-daemon image and configure it properly to Include blkid bin in sriov-network-operator-config-daemon image and configure it properly 2025-12-11 12:15:31 +01:00
antaloala force-pushed edge-1773 from bb39e4fbea to 5bae234647 2025-12-11 12:24:38 +01:00 Compare
eminguez approved these changes 2025-12-11 12:37:51 +01:00
eminguez left a comment
Owner

LGTM

LGTM
antaloala merged commit e5ff6b5107 into main 2025-12-11 12:39:26 +01:00
antaloala deleted branch edge-1773 2025-12-11 12:39:26 +01:00
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: suse-edge/Factory#329