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

This commit is contained in:
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}" \ "${group}" --zone "${ZONE}" --project "${PROJECT}" \
--format='value(instance)')) --format='value(instance)'))
done done
echo "INSTANCE_GROUPS=${INSTANCE_GROUPS[*]}" >&2
echo "NODE_NAMES=${NODE_NAMES[*]}" >&2
else
echo "INSTANCE_GROUPS=" >&2
echo "NODE_NAMES=" >&2
fi fi
echo "INSTANCE_GROUPS=${INSTANCE_GROUPS[*]:-}" >&2
echo "NODE_NAMES=${NODE_NAMES[*]:-}" >&2
} }
# Detect the information about the minions # Detect the information about the minions

View File

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