From 9cd158adf3877bd5c9931e552c7711f4db70f801 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Tue, 3 Dec 2019 23:40:28 -0500 Subject: [PATCH] template: Use a more correct kill command Avoids errors like ``` error: 51 fail, 36 pass, 129 skip (1h11m20s) kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] ``` --- ci-operator/templates/master-sidecar-3.yaml | 4 ++-- ci-operator/templates/master-sidecar-4.2.yaml | 2 +- ci-operator/templates/master-sidecar-4.3.yaml | 2 +- ci-operator/templates/master-sidecar-4.yaml | 2 +- .../openshift/endurance/endurance-install.yaml | 2 +- .../openshift/endurance/endurance-test.yaml | 2 +- ...cluster-launch-installer-custom-test-image.yaml | 4 ++-- .../installer/cluster-launch-installer-e2e.yaml | 4 ++-- .../cluster-launch-installer-libvirt-e2e.yaml | 4 ++-- .../cluster-launch-installer-metal-e2e.yaml | 4 ++-- .../cluster-launch-installer-openstack-e2e.yaml | 4 ++-- .../installer/cluster-launch-installer-src.yaml | 4 ++-- .../cluster-launch-installer-upi-e2e.yaml | 4 ++-- .../cluster-launch-installer-upi-src.yaml | 4 ++-- .../cluster-launch-e2e-openshift-ansible.yaml | 6 +++--- .../cluster-launch-e2e-openshift-jenkins.yaml | 8 ++++---- .../cluster-launch-e2e-upgrade.yaml | 8 ++++---- .../openshift-ansible/cluster-launch-e2e.yaml | 6 +++--- .../openshift-ansible/cluster-launch-src.yaml | 6 +++--- .../openshift-ansible/cluster-scaleup-e2e-40.yaml | 6 +++--- .../openshift-azure/cluster-launch-e2e-azure.yaml | 6 +++--- cluster/ci/config/service-ca.yaml | 2 +- core-services/ci-rpms/artifacts-rpms.yaml | 2 +- projects/gc-daemonset/daemonset.yaml | 14 +++++++------- 24 files changed, 55 insertions(+), 55 deletions(-) diff --git a/ci-operator/templates/master-sidecar-3.yaml b/ci-operator/templates/master-sidecar-3.yaml index dd7866427fadb..540d60744ce19 100644 --- a/ci-operator/templates/master-sidecar-3.yaml +++ b/ci-operator/templates/master-sidecar-3.yaml @@ -66,7 +66,7 @@ objects: set -euo pipefail trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM # wait until the master job creates admin.kubeconfig while true; do @@ -104,7 +104,7 @@ objects: echo "Gathering artifacts ..." } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM ( while true; do diff --git a/ci-operator/templates/master-sidecar-4.2.yaml b/ci-operator/templates/master-sidecar-4.2.yaml index 701d7fefa1dc3..f06da5e62dc07 100644 --- a/ci-operator/templates/master-sidecar-4.2.yaml +++ b/ci-operator/templates/master-sidecar-4.2.yaml @@ -122,7 +122,7 @@ objects: set -euo pipefail trap 'touch /tmp/shared/exit' EXIT - trap 'jobs -p | xargs kill || true; exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM # wait until the master job creates admin.kubeconfig while true; do diff --git a/ci-operator/templates/master-sidecar-4.3.yaml b/ci-operator/templates/master-sidecar-4.3.yaml index 95d11d4e3445a..f49ddbf54c5d4 100644 --- a/ci-operator/templates/master-sidecar-4.3.yaml +++ b/ci-operator/templates/master-sidecar-4.3.yaml @@ -122,7 +122,7 @@ objects: set -euo pipefail trap 'touch /tmp/shared/exit' EXIT - trap 'jobs -p | xargs kill || true; exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM # wait until the master job creates admin.kubeconfig while true; do diff --git a/ci-operator/templates/master-sidecar-4.yaml b/ci-operator/templates/master-sidecar-4.yaml index 5ce181ba54ea3..49dce742d8480 100644 --- a/ci-operator/templates/master-sidecar-4.yaml +++ b/ci-operator/templates/master-sidecar-4.yaml @@ -122,7 +122,7 @@ objects: set -euo pipefail trap 'touch /tmp/shared/exit' EXIT - trap 'jobs -p | xargs kill || true; exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM # wait until the master job creates admin.kubeconfig while true; do diff --git a/ci-operator/templates/openshift/endurance/endurance-install.yaml b/ci-operator/templates/openshift/endurance/endurance-install.yaml index 7d7cdafa1a911..4901174fcae19 100644 --- a/ci-operator/templates/openshift/endurance/endurance-install.yaml +++ b/ci-operator/templates/openshift/endurance/endurance-install.yaml @@ -321,7 +321,7 @@ objects: } - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM teardown # Runs an install diff --git a/ci-operator/templates/openshift/endurance/endurance-test.yaml b/ci-operator/templates/openshift/endurance/endurance-test.yaml index 72956488f36a4..cb13f454d3f25 100644 --- a/ci-operator/templates/openshift/endurance/endurance-test.yaml +++ b/ci-operator/templates/openshift/endurance/endurance-test.yaml @@ -110,7 +110,7 @@ objects: export PATH=/usr/libexec/origin:$PATH trap 'touch /tmp/done' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM mkdir -p "${HOME}" diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-custom-test-image.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-custom-test-image.yaml index be67950d89fb3..fa62afebcc526 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-custom-test-image.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-custom-test-image.yaml @@ -228,7 +228,7 @@ objects: export PATH=/tmp/shared:$PATH trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM function patch_image_specs() { cat <samples-patch.yaml @@ -863,7 +863,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in $(seq 1 220); do if [[ -f /tmp/shared/exit ]]; then diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml index ca044edf00281..adc58c054a737 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-e2e.yaml @@ -154,7 +154,7 @@ objects: export PATH=/usr/libexec/origin:$PATH trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM function fips_check() { oc --insecure-skip-tls-verify --request-timeout=60s get nodes -o jsonpath --template '{range .items[*]}{.metadata.name}{"\n"}{end}' > /tmp/nodelist @@ -854,7 +854,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in $(seq 1 220); do if [[ -f /tmp/shared/exit ]]; then diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-libvirt-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-libvirt-e2e.yaml index c547f2b00b3c2..f2f60dd658432 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-libvirt-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-libvirt-e2e.yaml @@ -127,7 +127,7 @@ objects: #!/bin/bash set -euo pipefail trap 'touch "${HOME}"/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM mock-nss.sh gcloud auth activate-service-account \ --quiet --key-file /tmp/cluster/gce.json @@ -326,7 +326,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in `seq 1 180`; do if [[ -f /home/packer/exit ]]; then diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml index 65c4884411d4a..55dff5617e8f2 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml @@ -124,7 +124,7 @@ objects: export PATH=/usr/libexec/origin:$PATH trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM mkdir -p "${HOME}" @@ -628,7 +628,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in $(seq 1 220); do if [[ -f /tmp/shared/exit ]]; then diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-openstack-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-openstack-e2e.yaml index 0842ad6a8c988..8e634e2401d4d 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-openstack-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-openstack-e2e.yaml @@ -191,7 +191,7 @@ objects: export PATH=/tmp/shared:/usr/libexec/origin:$PATH trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM mkdir -p "${HOME}" @@ -655,7 +655,7 @@ objects: export CLUSTER_NAME=${CLUSTER_NAME: -14} trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in $(seq 1 220); do if [[ -f /tmp/shared/exit ]]; then diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml index bc91290890582..4ff17dd5733d1 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-src.yaml @@ -180,7 +180,7 @@ objects: export PATH=/tmp/shared:$PATH trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM mkdir -p "${HOME}" @@ -770,7 +770,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in `seq 1 180`; do if [[ -f /tmp/shared/exit ]]; then diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml index 2c7886a8b8528..62d58e743adb5 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml @@ -260,7 +260,7 @@ objects: export PATH=/usr/libexec/origin:$PATH trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM mkdir -p "${HOME}" @@ -2110,7 +2110,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in $(seq 1 220); do if [[ -f /tmp/shared/exit ]]; then diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-src.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-src.yaml index a50677c743842..bc54110d46c5e 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-src.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-src.yaml @@ -269,7 +269,7 @@ objects: export PATH=/tmp/shared:$PATH trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM mkdir -p "${HOME}" @@ -1310,7 +1310,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in $(seq 1 220); do if [[ -f /tmp/shared/exit ]]; then diff --git a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-ansible.yaml b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-ansible.yaml index 216bcc40ddb47..363a6ccd7ef86 100644 --- a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-ansible.yaml +++ b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-ansible.yaml @@ -96,7 +96,7 @@ objects: export PATH=/usr/libexec/origin:$PATH trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM cp "$(which oc)" /tmp/shared/ @@ -195,7 +195,7 @@ objects: set -euo pipefail trap 'rc=$?; if [[ $rc -ne 0 ]]; then touch /tmp/shared/exit; fi; exit $rc' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM cd /usr/share/ansible/openshift-ansible/ mkdir -p test/ci/inventory/group_vars/OSEv3 @@ -314,7 +314,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in `seq 1 180`; do if [[ -f /tmp/shared/exit ]]; then diff --git a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-jenkins.yaml b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-jenkins.yaml index 0df7ab850d208..cd636a5e53b53 100644 --- a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-jenkins.yaml +++ b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-openshift-jenkins.yaml @@ -97,7 +97,7 @@ objects: set -euo pipefail trap 'touch /tmp/shared/prepared' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM cp "$(which oc)" /tmp/shared/ @@ -181,7 +181,7 @@ objects: export PATH=/usr/libexec/origin:$PATH trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM cp "$(which oc)" /tmp/shared/ @@ -286,7 +286,7 @@ objects: set -euo pipefail trap 'rc=$?; if [[ $rc -ne 0 ]]; then touch /tmp/exit; fi; exit $rc' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM ansible-playbook -vv \ -e openshift_test_repo=${RPM_REPO_OPENSHIFT_ORIGIN} -e 'oreg_url=${IMAGE_FORMAT}' \ @@ -363,7 +363,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in `seq 1 180`; do if [[ -f /tmp/shared/exit ]]; then diff --git a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-upgrade.yaml b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-upgrade.yaml index 6d7612c8d3377..0156144ef060f 100644 --- a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-upgrade.yaml +++ b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e-upgrade.yaml @@ -100,7 +100,7 @@ objects: export PATH=/usr/libexec/origin:$PATH trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM cp "$(which oc)" /tmp/shared/ @@ -190,7 +190,7 @@ objects: set -euo pipefail trap 'rc=$?; if [[ $rc -ne 0 ]]; then touch /tmp/shared/exit; else touch /tmp/shared/install; fi; exit $rc' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM ansible-playbook -vv \ -e openshift_test_repo="${PREVIOUS_RPM_REPO}" \ @@ -223,7 +223,7 @@ objects: set -euo pipefail trap 'rc=$?; if [[ $rc -ne 0 ]]; then touch /tmp/shared/exit; else touch /tmp/shared/test; fi; exit $rc' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM while true; do if [[ ! -f /tmp/shared/install ]]; then @@ -311,7 +311,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in `seq 1 180`; do if [[ -f /tmp/shared/exit ]]; then diff --git a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e.yaml b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e.yaml index d55e78b0a9aad..cfee90de28da8 100644 --- a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e.yaml +++ b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-e2e.yaml @@ -98,7 +98,7 @@ objects: export PATH=/usr/libexec/origin:$PATH trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM cp "$(which oc)" /tmp/shared/ @@ -189,7 +189,7 @@ objects: set -euo pipefail trap 'rc=$?; if [[ $rc -ne 0 ]]; then touch /tmp/exit; fi; exit $rc' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM ansible-playbook -vv \ -e openshift_test_repo=${RPM_REPO_OPENSHIFT_ORIGIN} -e 'oreg_url=${IMAGE_FORMAT}' \ @@ -267,7 +267,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in `seq 1 180`; do if [[ -f /tmp/shared/exit ]]; then diff --git a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-src.yaml b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-src.yaml index e087a1c2a760e..9c3559aba6525 100644 --- a/ci-operator/templates/openshift/openshift-ansible/cluster-launch-src.yaml +++ b/ci-operator/templates/openshift/openshift-ansible/cluster-launch-src.yaml @@ -111,7 +111,7 @@ objects: export PATH=/tmp/shared:$PATH trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM mkdir -p "${HOME}" @@ -172,7 +172,7 @@ objects: set -euo pipefail trap 'rc=$?; if [[ $rc -ne 0 ]]; then touch /tmp/exit; fi; exit $rc' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM ansible-playbook -vv \ -e openshift_test_repo=${RPM_REPO_OPENSHIFT_ORIGIN} -e 'oreg_url=${IMAGE_FORMAT}' \ @@ -250,7 +250,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in `seq 1 180`; do if [[ -f /tmp/shared/exit ]]; then diff --git a/ci-operator/templates/openshift/openshift-ansible/cluster-scaleup-e2e-40.yaml b/ci-operator/templates/openshift/openshift-ansible/cluster-scaleup-e2e-40.yaml index 5bf1d3ad04c5e..d31634cea0fa6 100644 --- a/ci-operator/templates/openshift/openshift-ansible/cluster-scaleup-e2e-40.yaml +++ b/ci-operator/templates/openshift/openshift-ansible/cluster-scaleup-e2e-40.yaml @@ -184,7 +184,7 @@ objects: export PATH=/usr/libexec/origin:$PATH trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM mkdir -p "${HOME}" @@ -390,7 +390,7 @@ objects: set -euo pipefail trap 'rc=$?; if test "${rc}" -eq 0; then touch /tmp/scaleup-success; else touch /tmp/exit; fi; exit "${rc}"' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM echo -n "Waiting for cluster setup..." @@ -573,7 +573,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM for i in $(seq 1 220); do if [[ -f /tmp/shared/exit ]]; then diff --git a/ci-operator/templates/openshift/openshift-azure/cluster-launch-e2e-azure.yaml b/ci-operator/templates/openshift/openshift-azure/cluster-launch-e2e-azure.yaml index 39ad26d6adfd5..a30b06cccdfab 100644 --- a/ci-operator/templates/openshift/openshift-azure/cluster-launch-e2e-azure.yaml +++ b/ci-operator/templates/openshift/openshift-azure/cluster-launch-e2e-azure.yaml @@ -162,7 +162,7 @@ objects: set -euo pipefail trap 'touch /tmp/shared/exit' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM # wait until the setup job completes successfully while true; do @@ -279,7 +279,7 @@ objects: touch /tmp/shared/exit fi exit $rc' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM # aad integration configuration - we dont test aad so populate as dummy source /etc/azure/credentials/secret @@ -401,7 +401,7 @@ objects: } trap 'teardown' EXIT - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM # teardown is triggered on file marker for i in `seq 1 1440`; do diff --git a/cluster/ci/config/service-ca.yaml b/cluster/ci/config/service-ca.yaml index 707060ea58075..9212aae93a5eb 100644 --- a/cluster/ci/config/service-ca.yaml +++ b/cluster/ci/config/service-ca.yaml @@ -37,7 +37,7 @@ spec: # set by the node image unset KUBECONFIG - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM while true; do mkdir -p /etc/docker/certs.d/docker-registry.default.svc:5000/ cp /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt /etc/docker/certs.d/docker-registry.default.svc:5000/ diff --git a/core-services/ci-rpms/artifacts-rpms.yaml b/core-services/ci-rpms/artifacts-rpms.yaml index 6a618aed3f13a..6cf6ab10ce9d1 100644 --- a/core-services/ci-rpms/artifacts-rpms.yaml +++ b/core-services/ci-rpms/artifacts-rpms.yaml @@ -84,7 +84,7 @@ items: - | #!/bin/bash set -euo pipefail - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM while true; do cat </tmp/openshift.repo diff --git a/projects/gc-daemonset/daemonset.yaml b/projects/gc-daemonset/daemonset.yaml index d135e78a7382d..dc38f0f4411b5 100644 --- a/projects/gc-daemonset/daemonset.yaml +++ b/projects/gc-daemonset/daemonset.yaml @@ -20,7 +20,7 @@ spec: #!/bin/bash set -euo pipefail - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM while true; do sleep 600 & wait $! @@ -38,7 +38,7 @@ spec: #!/bin/bash set -euo pipefail - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM while true; do sleep 600 & wait $! @@ -56,7 +56,7 @@ spec: #!/bin/bash set -euo pipefail - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM while true; do sleep 600 & wait $! @@ -74,7 +74,7 @@ spec: #!/bin/bash set -euo pipefail - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM while true; do sleep 600 & wait $! @@ -92,7 +92,7 @@ spec: #!/bin/bash set -euo pipefail - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM while true; do sleep 600 & wait $! @@ -110,7 +110,7 @@ spec: #!/bin/bash set -euo pipefail - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM while true; do sleep 600 & wait $! @@ -128,7 +128,7 @@ spec: #!/bin/bash set -euo pipefail - trap 'kill $(jobs -p); exit 0' TERM + trap 'jobs -p | xargs -r kill; exit 0' TERM while true; do sleep 600 & wait $!