From 01628ae8c19bc6510e4abd3cf88da62d9efb022d Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 16 May 2023 12:14:46 +0300 Subject: [PATCH] test,minio: Run mc with --debug option With that if mc fails we'll (hopefully) get some meaningful information about why it happened. Signed-off-by: Pavel Emelyanov --- test/pylib/minio_server.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/pylib/minio_server.py b/test/pylib/minio_server.py index 0fd6f27e6f..90c1c4a420 100644 --- a/test/pylib/minio_server.py +++ b/test/pylib/minio_server.py @@ -85,16 +85,16 @@ class MinioServer: try: self.log_to_file(f'Configuring access to {self.address}:{self.port}') try: - subprocess.check_call(['mc', '-C', self.mcdir, 'config', 'host', 'rm', 'local'], stdout=self.log_file, stderr=self.log_file) + subprocess.check_call(['mc', '--debug', '-C', self.mcdir, 'config', 'host', 'rm', 'local'], stdout=self.log_file, stderr=self.log_file) except: self.log_to_file('Failed to remove local alias, ignoring') pass - subprocess.check_call(['mc', '-C', self.mcdir, 'config', 'host', 'add', 'local', f'http://{self.address}:{self.port}', self.default_user, self.default_pass], stdout=self.log_file, stderr=self.log_file) + subprocess.check_call(['mc', '--debug', '-C', self.mcdir, 'config', 'host', 'add', 'local', f'http://{self.address}:{self.port}', self.default_user, self.default_pass], stdout=self.log_file, stderr=self.log_file) self.log_to_file(f'Configuring bucket {self.bucket_name}') - subprocess.check_call(['mc', '-C', self.mcdir, 'mb', f'local/{self.bucket_name}'], stdout=self.log_file, stderr=self.log_file) - subprocess.check_call(['mc', '-C', self.mcdir, 'anonymous', 'set', 'public', f'local/{self.bucket_name}'], stdout=self.log_file, stderr=self.log_file) + subprocess.check_call(['mc', '--debug', '-C', self.mcdir, 'mb', f'local/{self.bucket_name}'], stdout=self.log_file, stderr=self.log_file) + subprocess.check_call(['mc', '--debug', '-C', self.mcdir, 'anonymous', 'set', 'public', f'local/{self.bucket_name}'], stdout=self.log_file, stderr=self.log_file) except Exception as e: self.logger.info(f'MC failed: {e}') await self.stop()