From bca210eccf698c93239801b794ae8c0acdf77158 Mon Sep 17 00:00:00 2001 From: Furtchet Date: Wed, 18 Oct 2017 09:53:01 -0500 Subject: [PATCH] Don't require minio to be up when doing mysql health checks. This allows minio to restart and not cause mysql-primary to go unhealthy. --- bin/manager/storage/minio_stor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/manager/storage/minio_stor.py b/bin/manager/storage/minio_stor.py index 629fc74..fafceba 100644 --- a/bin/manager/storage/minio_stor.py +++ b/bin/manager/storage/minio_stor.py @@ -28,10 +28,6 @@ def __init__(self, envs=os.environ): access_key=self.access_key, secret_key=self.secret_key, secure=is_tls) - try: - self.client.make_bucket(self.bucket, location=self.location) - except minioerror.BucketAlreadyOwnedByYou: - pass @debug def get_backup(self, backup_id): @@ -49,5 +45,9 @@ def put_backup(self, backup_id, infile): """ Upload the backup file to the expected path. """ + try: + self.client.make_bucket(self.bucket, location=self.location) + except minioerror.BucketAlreadyOwnedByYou: + pass self.client.fput_object(self.bucket, backup_id, infile) return backup_id