[IMPORTANT] Deprecation of mc config host command in favor of mc alias set

This post is to reflect on an important change that's been made in our quickstart script and for users who already have a running cluster with our quickstart script. There's a bug in our quickstart related to MinIO that prevented creation of buckets by post_start hook, this is due to the latest image of MinIO having deprecated mc config in favor of mc alias set, which caused infinite looping. For those who are using the latest Docker image of MinIO, please change the post_start section as follows:
post_start:
- command: |
sh -c '
#!/bin/sh
# Initially this line should be while ! mc config host add h0 http://minio:3200 $minio_user $minio_pass 2>/dev/null
while ! mc alias set h0 http://minio:3200 $minio_user $minio_pass 2>/dev/null
do
echo "Waiting for minio..."
sleep 0.5
done

cd /data

mc mb -p b2-eu-cen
mc mb -p wasabi-eu-central-2-v3
mc mb -p scw-eu-fr-v3
'
post_start:
- command: |
sh -c '
#!/bin/sh
# Initially this line should be while ! mc config host add h0 http://minio:3200 $minio_user $minio_pass 2>/dev/null
while ! mc alias set h0 http://minio:3200 $minio_user $minio_pass 2>/dev/null
do
echo "Waiting for minio..."
sleep 0.5
done

cd /data

mc mb -p b2-eu-cen
mc mb -p wasabi-eu-central-2-v3
mc mb -p scw-eu-fr-v3
'
For users of the older MinIO image, it's recommended to change this command nevertheless as mc config has been deprecated a long time ago as per their official documentation.
1 Reply
Ducky
Ducky5mo ago
Remember to use /solved to mark your thread as solved once your question is answered.

Did you find this page helpful?