From ee8e57005ca5212a53706845dd3347af014d0416 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 29 Jul 2026 15:47:57 -0500 Subject: [PATCH] Added catch for race condition dugin build host setup with chown -R jenkins command The script will output the active processes in hopes of finding something that is also manipulating /home/jenkins on the build host. Ticket: ENT-14386 Changelog: none --- ci/setup-cfengine-build-host.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/setup-cfengine-build-host.sh b/ci/setup-cfengine-build-host.sh index 795d5f567..ecf8edbbd 100755 --- a/ci/setup-cfengine-build-host.sh +++ b/ci/setup-cfengine-build-host.sh @@ -26,7 +26,11 @@ fuser -k "$CHROOT_ROOT" >/dev/null 2>&1 || true # Unmount the /proc filesystem if it was previously mounted inside the chroot. umount "${CHROOT_ROOT}proc" >/dev/null 2>&1 || true -chown -R jenkins /home/jenkins +# ENT-14386 often it seems we are experiencing a race condition with this script and something else causing trouble +if ! chown -R jenkins /home/jenkins; then + echo "ENT-14386 some trouble chown -R jenkins /home/jenkins, current processes are:" + ps -efl +fi # cleanup any previous runs cfengine-masterfiles tar balls rm -rf cfengine-masterfiles*