diff --git a/buildscripts/minio-upgrade.sh b/buildscripts/minio-upgrade.sh index d90dfb503..9904e7889 100644 --- a/buildscripts/minio-upgrade.sh +++ b/buildscripts/minio-upgrade.sh @@ -37,8 +37,11 @@ verify_checksum_mc() { } add_alias() { - until (mc alias set minio http://127.0.0.1:9000 minioadmin minioadmin); do - echo "...waiting... for 5secs" && sleep 5 + for i in $(seq 1 4); do + echo "... attempting to add alias $i" + until (mc alias set minio http://127.0.0.1:9000 minioadmin minioadmin); do + echo "...waiting... for 5secs" && sleep 5 + done done } diff --git a/internal/logger/target/http/http.go b/internal/logger/target/http/http.go index b8bb28b9c..d08a9de9d 100644 --- a/internal/logger/target/http/http.go +++ b/internal/logger/target/http/http.go @@ -157,7 +157,7 @@ func (h *Target) startHTTPLogger() { // Drain any response. xhttp.DrainBody(resp.Body) - if resp.StatusCode != http.StatusOK { + if !acceptedResponseStatusCode(resp.StatusCode) { switch resp.StatusCode { case http.StatusForbidden: h.config.LogOnce(ctx, fmt.Errorf("%s returned '%s', please check if your auth token is correctly set", h.config.Endpoint, resp.Status), h.config.Endpoint)