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 451c88a commit 23def0a
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 @@ -2826,7 +2826,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 @@ -358,7 +358,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 23def0a

Please sign in to comment.