Skip to content

Commit 4b487f2

Browse files
authored
Improve cluster up status message formatting for docker image downloading (#2057)
1 parent 905321c commit 4b487f2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

manager/install.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,8 @@ function start_pre_download_images() {
356356
}
357357

358358
function await_pre_download_images() {
359-
echo -n "○ downloading docker images ."
359+
echo -n "○ downloading docker images "
360+
printed_dot="false"
360361
for ds_name in image-downloader-cpu image-downloader-gpu image-downloader-inf; do
361362
if ! kubectl get daemonset $ds_name > /dev/null 2>&1; then
362363
continue
@@ -365,13 +366,14 @@ function await_pre_download_images() {
365366
until [ "$(kubectl get daemonset $ds_name -n=default -o 'jsonpath={.status.numberReady}')" == "$(kubectl get daemonset $ds_name -n=default -o 'jsonpath={.status.desiredNumberScheduled}')" ]; do
366367
if [ $i -eq 120 ]; then break; fi # give up after 6 minutes
367368
echo -n "."
369+
printed_dot="true"
368370
((i=i+1))
369371
sleep 3
370372
done
371373
kubectl -n=default delete --ignore-not-found=true daemonset $ds_name &>/dev/null
372374
done
373375

374-
echo ""
376+
if [ "$printed_dot" == "true" ]; then echo ""; else echo ""; fi
375377
}
376378

377379
function validate_cortex() {

0 commit comments

Comments
 (0)