From 21014f52aea80f8074cc0eb01b7304234a0054d7 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Sat, 17 Jun 2023 17:35:22 -0400 Subject: [PATCH] add usermod workaround for openvswitch hugetlbfs group The RPM is now using systemd-sysusers fragments [1] and the RPM scriptlets no longer successfully add the `hugetlbfs` group to the `openvswitch` user [2]. Let's add a workaround for now while we investigate. [1] https://github.com/openshift/os/issues/1274#issuecomment-1593690794 [2] https://github.com/openshift/os/issues/1274#issuecomment-1595860275 --- common.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common.yaml b/common.yaml index 8498df60..51e2bc22 100644 --- a/common.yaml +++ b/common.yaml @@ -192,6 +192,17 @@ postprocess: # but we have containers that expect it to be mounted so for now let's continue # generating it. ln -sr /usr/share/zoneinfo/UTC /etc/localtime + - | + #!/usr/bin/env bash + set -xeo pipefail + # Add the hugetlbfs group to the openvswitch user if the openvswitch-hugetlbfs.conf + # sysusers fragment exists. The usermod used to happen in the RPM scriptlets but + # that stopped working in the sysusers conversion. We still need need to investigate + # it further. https://github.com/openshift/os/issues/1274#issuecomment-1595860275 + if [ -f /usr/lib/sysusers.d/openvswitch-hugetlbfs.conf ]; then + usermod -a -G hugetlbfs openvswitch + fi + remove-files: # We don't ship man(1) or info(1)