diff --git a/roles/pull-from-intermediate-registry/tasks/main.yaml b/roles/pull-from-intermediate-registry/tasks/main.yaml index 90fadaca8..7958eaacc 100644 --- a/roles/pull-from-intermediate-registry/tasks/main.yaml +++ b/roles/pull-from-intermediate-registry/tasks/main.yaml @@ -9,7 +9,11 @@ # fact that docker does not correctly parse ipv6 addresses. The socat # process will terminate when the playbook ends. - name: Start socat to work around https://github.com/moby/moby/issues/39033 - shell: "socat -d -d TCP-LISTEN:0,fork TCP:{{ buildset_registry.host | ipwrap }}:{{ buildset_registry.port }} 2> {{ zuul.executor.work_root }}/socat_port &" + shell: | + set -o pipefail + socat -d -d TCP-LISTEN:0,fork TCP:{{ buildset_registry.host | ipwrap }}:{{ buildset_registry.port }} 2>&1 | grep --line-buffered 'listening on' > {{ zuul.executor.work_root }}/socat_port & + args: + executable: /bin/bash # Use slurp instead of file lookup to make this testable on a fake # executor node. diff --git a/roles/push-to-intermediate-registry/tasks/push.yaml b/roles/push-to-intermediate-registry/tasks/push.yaml index 347f99d38..57e72da7f 100644 --- a/roles/push-to-intermediate-registry/tasks/push.yaml +++ b/roles/push-to-intermediate-registry/tasks/push.yaml @@ -9,7 +9,11 @@ # fact that docker does not correctly parse ipv6 addresses. The socat # process will terminate when the playbook ends. - name: Start socat to work around https://github.com/moby/moby/issues/39033 - shell: "socat -d -d TCP-LISTEN:0,fork TCP:{{ buildset_registry.host | ipwrap }}:{{ buildset_registry.port }} 2> {{ zuul.executor.work_root }}/socat_port &" + shell: | + set -o pipefail + socat -d -d TCP-LISTEN:0,fork TCP:{{ buildset_registry.host | ipwrap }}:{{ buildset_registry.port }} 2>&1 | grep --line-buffered 'listening on' > {{ zuul.executor.work_root }}/socat_port & + args: + executable: /bin/bash # Use slurp instead of file lookup to make this testable on a fake # executor node.