Improve kubetest error reporting

The kubetest command used to say [SUCCESS] on completely
fresh nodes. Now we check the existence of the /tmp/node
file, as well as of the kubectl executable.
This commit is contained in:
Jerome Petazzoni
2018-03-07 16:17:57 -08:00
parent 3b336a9127
commit eaf25e5b36

View File

@@ -177,7 +177,9 @@ _cmd_kubetest() {
# Feel free to make that better ♥
pssh "
set -e
[ -f /tmp/node ]
if grep -q node1 /tmp/node; then
which kubectl
for NODE in \$(awk /\ node/\ {print\ \\\$2} /etc/hosts); do
echo \$NODE ; kubectl get nodes | grep -w \$NODE | grep -w Ready
done