Fix logical backup script sigpipe problem (#1623)
This commit is contained in:
		
							parent
							
								
									698377719f
								
							
						
					
					
						commit
						d3183604a7
					
				| 
						 | 
					@ -84,15 +84,15 @@ declare -a search_strategy=(
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function list_all_replica_pods_current_node {
 | 
					function list_all_replica_pods_current_node {
 | 
				
			||||||
    get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dreplica&fieldSelector=spec.nodeName%3D${CURRENT_NODENAME}" | head -n 1
 | 
					    get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dreplica&fieldSelector=spec.nodeName%3D${CURRENT_NODENAME}" | tee | head -n 1
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function list_all_replica_pods_any_node {
 | 
					function list_all_replica_pods_any_node {
 | 
				
			||||||
    get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dreplica" | head -n 1
 | 
					    get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dreplica" | tee | head -n 1
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function get_master_pod {
 | 
					function get_master_pod {
 | 
				
			||||||
    get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dmaster" | head -n 1
 | 
					    get_pods "labelSelector=${CLUSTER_NAME_LABEL}%3D${SCOPE},spilo-role%3Dmaster" | tee | head -n 1
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CURRENT_NODENAME=$(get_current_pod | jq .items[].spec.nodeName --raw-output)
 | 
					CURRENT_NODENAME=$(get_current_pod | jq .items[].spec.nodeName --raw-output)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue