From 44a03b7ced17b629377cd1de09eddd57ca7154e5 Mon Sep 17 00:00:00 2001 From: Egor Medvedev Date: Fri, 15 Nov 2024 22:06:26 +0000 Subject: [PATCH] [MDB-32251] Skip access checks for cloud storage disk of source cluster --- ch_backup/clickhouse/disks.py | 3 +++ tests/unit/test_disks.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ch_backup/clickhouse/disks.py b/ch_backup/clickhouse/disks.py index 3631f762..1a65f157 100644 --- a/ch_backup/clickhouse/disks.py +++ b/ch_backup/clickhouse/disks.py @@ -159,6 +159,7 @@ def _create_temporary_disk( ) disk_config["endpoint"] = tmp_disk_enpoint + disks_config = {tmp_disk_name: disk_config} request_timeout_ms = int(disk_config.get("request_timeout_ms", 0)) @@ -177,6 +178,8 @@ def _create_temporary_disk( CH_OBJECT_STORAGE_REQUEST_TIMEOUT_MS ) + disks_config[tmp_disk_name]["skip_access_check"] = str(True).lower() + self._render_disks_config( _get_config_path(self._config_dir, tmp_disk_name), disks_config, diff --git a/tests/unit/test_disks.py b/tests/unit/test_disks.py index 6901c564..3f7ee35c 100644 --- a/tests/unit/test_disks.py +++ b/tests/unit/test_disks.py @@ -49,6 +49,7 @@ AKIAACCESSKEY SecretAccesskey 3600000 + true 3600000 @@ -94,6 +95,7 @@ AKIAACCESSKEY SecretAccesskey 3600000 + true 3600000 @@ -139,6 +141,7 @@ AKIAACCESSKEY SecretAccesskey 7200000 + true