+++ This bug was initially created as a clone of Bug #2193168 +++ We have observed that ppc64le RHCOS builds fail to modify the hugetlbfs group to add the openvswitch user, which causes OVS startup to fail because it cannot chown directories to the right group/user. This appears to be because RPM's /bin/sh does not "set -e" and therefore errors returned by useradd/groupadd/usermod get ignored and do not terminate the %pre script. %pre getent group openvswitch >/dev/null || groupadd -r openvswitch getent passwd openvswitch >/dev/null || \ useradd -r -g openvswitch -d / -s /sbin/nologin \ -c "Open vSwitch Daemons" openvswitch %ifarch %{dpdkarches} getent group hugetlbfs >/dev/null || groupadd hugetlbfs usermod -a -G hugetlbfs openvswitch %endif exit 0 This causes issues like: [2023-05-02T18:30:05.713Z] openvswitch3.1.prein: usermod.rpmostreesave: /etc/passwd.6: lock file already used [2023-05-02T18:30:05.713Z] openvswitch3.1.prein: usermod.rpmostreesave: cannot lock /etc/passwd; try again later. If we add "|| exit 1" behind those it'll supposedly help surface errors.
* Fri Jun 16 2023 Timothy Redaelli <tredaelli> - 2.17.0-92 - redhat: Use sysusers instead of useradd/groupadd directly [RH git: aeeb5c020a] (#2193168) Reported-at: https://bugzilla.redhat.com/2193168 Reported-by: Dan Williams <dcbw> Signed-off-by: Timothy Redaelli <tredaelli>
Marking BZ Verified per https://bugzilla.redhat.com/show_bug.cgi?id=2193168#c13.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (openvswitch2.17 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:3988