From 5e44ef8192a6b0208a0c2a89aee869fef778c3f6 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 --- manifest-rhel-9.2.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/manifest-rhel-9.2.yaml b/manifest-rhel-9.2.yaml index 3c7e6ac3d..03698ce74 100644 --- a/manifest-rhel-9.2.yaml +++ b/manifest-rhel-9.2.yaml @@ -108,6 +108,17 @@ postprocess: --- EOF + # 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 + - | + #!/usr/bin/env bash + set -xeo pipefail + if [ -f /usr/lib/sysusers.d/openvswitch-hugetlbfs.conf ]; then + usermod -a -G hugetlbfs openvswitch + fi + # Packages that are only in RHCOS and not in SCOS or that have special # constraints that do not apply to SCOS packages: