From 79c0e6b10ff37f36c46849ec0c8289a093494a06 Mon Sep 17 00:00:00 2001 From: james hughes Date: Wed, 25 Sep 2024 17:20:06 +0000 Subject: [PATCH] throw attempt spaghetti at the wall --- internal/buildscripts/packaging/tests/helpers/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/buildscripts/packaging/tests/helpers/util.py b/internal/buildscripts/packaging/tests/helpers/util.py index 2a42945192..be14b887da 100644 --- a/internal/buildscripts/packaging/tests/helpers/util.py +++ b/internal/buildscripts/packaging/tests/helpers/util.py @@ -184,7 +184,7 @@ def ensure_always(test, timeout=DEFAULT_TIMEOUT, interval=1): def service_is_running(container, service_name=SERVICE_NAME, service_owner=SERVICE_OWNER, process=OTELCOL_BIN): # For some reason, opensuse-15 and sometimes rocky-8 don't set the path correctly? # Anyway triage this as hard as possible for now - cmd = f"""sh -ec 'systemctl status {service_name} && export PATH="$PATH:/bin/" && (pgrep -a -u {service_owner} -f {process} || /bin/pgrep -a -u {service_owner} -f {process})'""" + cmd = f"""sh -ec 'systemctl status {service_name} && export PATH="$PATH:/bin/" && (pgrep -a -u {service_owner} -f {process} || /bin/pgrep -a -u {service_owner} -f {process} || (ps aux | grep -q {process})) '""" code, _ = run_container_cmd(container, cmd, exit_code=None) return code == 0