Fix detect-node-names to not error out if there are no nodes

pull/6/head
Jeff Grafton 2016-04-26 17:41:15 -07:00
parent 3b09c64161
commit 5487a3f8f6
2 changed files with 3 additions and 6 deletions

View File

@ -284,12 +284,9 @@ function detect-node-names {
"${group}" --zone "${ZONE}" --project "${PROJECT}" \
--format='value(instance)'))
done
echo "INSTANCE_GROUPS=${INSTANCE_GROUPS[*]}" >&2
echo "NODE_NAMES=${NODE_NAMES[*]}" >&2
else
echo "INSTANCE_GROUPS=" >&2
echo "NODE_NAMES=" >&2
fi
echo "INSTANCE_GROUPS=${INSTANCE_GROUPS[*]:-}" >&2
echo "NODE_NAMES=${NODE_NAMES[*]:-}" >&2
}
# Detect the information about the minions

View File

@ -251,7 +251,7 @@ function detect-node-names {
"${NODE_INSTANCE_GROUP}" --zone "${ZONE}" --project "${PROJECT}" \
--format='value(instance)'))
echo "NODE_NAMES=${NODE_NAMES[*]}"
echo "NODE_NAMES=${NODE_NAMES[*]:-}"
}
# Detect instance group name generated by gke.