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

View File

@@ -10,6 +10,22 @@ RUN zypper --installroot /installroot --non-interactive install --no-recommends
zypper -n clean; \
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 and related https://bugzilla.suse.com/show_bug.cgi?id=1247914
eminguez marked this conversation as resolved Outdated

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
#
# CHKSTAT_ALLOW_INSECURE_MODE_IF_NO_PROC var setting is required when zypper-installing the "util-linux" package;
# see https://bugzilla.suse.com/show_bug.cgi?id=1219736#c54
#
eminguez marked this conversation as resolved Outdated

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

I am removing all the slack links

I am removing all the slack links
# 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
#
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/*; \
eminguez marked this conversation as resolved Outdated

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} ```

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).
[ -e "${BLKID_CONF_TMP}" ] && sed -i -e 's/^EVALUATE=.*/EVALUATE=scan/g' ${BLKID_CONF_TMP} || echo "EVALUATE=scan" > ${BLKID_CONF_TMP}
FROM micro AS final
# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=com.suse.application.sriov-network-config-daemon