Skip to content

Commit d318360

Browse files
authored
Fix logical backup script sigpipe problem (zalando#1623)
1 parent 6983777 commit d318360

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docker/logical-backup/dump.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ declare -a search_strategy=(
8484
)
8585

8686
function list_all_replica_pods_current_node {
87-
get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dreplica&fieldSelector=spec.nodeName%3D${CURRENT_NODENAME}" | head -n 1
87+
get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dreplica&fieldSelector=spec.nodeName%3D${CURRENT_NODENAME}" | tee | head -n 1
8888
}
8989

9090
function list_all_replica_pods_any_node {
91-
get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dreplica" | head -n 1
91+
get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dreplica" | tee | head -n 1
9292
}
9393

9494
function get_master_pod {
95-
get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dmaster" | head -n 1
95+
get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dmaster" | tee | head -n 1
9696
}
9797

9898
CURRENT_NODENAME=$(get_current_pod | jq .items[].spec.nodeName --raw-output)

0 commit comments

Comments
 (0)