Skip to content

Commit

Permalink
throw attempt spaghetti at the wall
Browse files Browse the repository at this point in the history
  • Loading branch information
hughesjj committed Sep 25, 2024
1 parent 2814f16 commit 79c0e6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/buildscripts/packaging/tests/helpers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 79c0e6b

Please sign in to comment.