Skip to content

Commit

Permalink
kubectl-ko: turn off pipefail for ovn leader check (#1891)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Sep 7, 2022
1 parent d2be779 commit dd22f68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dist/images/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2682,7 +2682,9 @@ xxctl(){
checkLeader(){
component="$1"; shift
set +o pipefail
count=$(kubectl get ep ovn-$component -n $KUBE_OVN_NS -o yaml | grep ip | wc -l)
set -o pipefail
if [ $count -eq 0 ]; then
echo "no ovn-$component exists !!"
exit 1
Expand Down
2 changes: 2 additions & 0 deletions dist/images/kubectl-ko
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ xxctl(){

checkLeader(){
component="$1"; shift
set +o pipefail
count=$(kubectl get ep ovn-$component -n $KUBE_OVN_NS -o yaml | grep ip | wc -l)
set -o pipefail
if [ $count -eq 0 ]; then
echo "no ovn-$component exists !!"
exit 1
Expand Down

0 comments on commit dd22f68

Please sign in to comment.