tendermint/tools

Kubernetes script has maybe a small bug in the bash script

Closed this issue · 4 comments

As we got the error in our script, I fill this issue. I am not sure if this case is handle properly on the kubernetes however ..
In our case, It happenned sometimes that the nginx is working but the file is not copied yet so the script will failed.
Please find below a fix to the problem.

if curl -s "http://$v/pub_key.json" | grep "404 Not Found"
then
ERR=10
fi
  
  | while [ "$ERR" != 0 ]; do
  | sleep 5
  | curl -s "http://$v/pub_key.json" > /dev/null
  | ERR=$?
  |  
  | if curl -s "http://$v/pub_key.json" | grep "404 Not Found"
  | then
  | ERR=10
  | fi
  |  
  | done

@antoineherzog could you test #38 and see if it fixes the problem?

@melekes sure, let me check

@melekes i think we are good now!

Awesome! Thanks