diff --git a/test/cases/openshift_virtualization.sh b/test/cases/openshift_virtualization.sh index 85a069106..55d92cbbe 100755 --- a/test/cases/openshift_virtualization.sh +++ b/test/cases/openshift_virtualization.sh @@ -19,6 +19,9 @@ function cleanup() { $OC_CLI delete pvc "$PVC_NAME" sudo rm -rf "$TEMPDIR" + + # Stop watching the worker journal when exiting. + sudo pkill -P "${WORKER_JOURNAL_PID}" } trap cleanup EXIT @@ -96,8 +99,6 @@ sudo composer-cli blueprints depsolve bash WORKER_UNIT=$(sudo systemctl list-units | grep -o -E "osbuild.*worker.*\.service") sudo journalctl -af -n 1 -u "${WORKER_UNIT}" & WORKER_JOURNAL_PID=$! -# Stop watching the worker journal when exiting. -trap 'sudo pkill -P ${WORKER_JOURNAL_PID}' EXIT # Start the compose and upload to OpenShift greenprint "🚀 Starting compose" @@ -126,7 +127,6 @@ get_compose_metadata "$COMPOSE_ID" # Kill the journal monitor immediately and remove the trap sudo pkill -P ${WORKER_JOURNAL_PID} -trap - EXIT # Did the compose finish with success? if [[ $COMPOSE_STATUS != FINISHED ]]; then