Skip to content

Commit

Permalink
[MDB-32251] Skip access checks for cloud storage disk of source clust…
Browse files Browse the repository at this point in the history
…er (#199)
  • Loading branch information
MedvedewEM authored Nov 16, 2024
1 parent 0a32eca commit 2b08599
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ch_backup/clickhouse/disks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/test_disks.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<access_key_id>AKIAACCESSKEY</access_key_id>
<secret_access_key>SecretAccesskey</secret_access_key>
<request_timeout_ms>3600000</request_timeout_ms>
<skip_access_check>true</skip_access_check>
</object_storage_source>
<object_storage>
<request_timeout_ms replace="replace">3600000</request_timeout_ms>
Expand Down Expand Up @@ -94,6 +95,7 @@
<access_key_id>AKIAACCESSKEY</access_key_id>
<secret_access_key>SecretAccesskey</secret_access_key>
<request_timeout_ms>3600000</request_timeout_ms>
<skip_access_check>true</skip_access_check>
</object_storage_source>
<object_storage>
<request_timeout_ms replace="replace">3600000</request_timeout_ms>
Expand Down Expand Up @@ -139,6 +141,7 @@
<access_key_id>AKIAACCESSKEY</access_key_id>
<secret_access_key>SecretAccesskey</secret_access_key>
<request_timeout_ms>7200000</request_timeout_ms>
<skip_access_check>true</skip_access_check>
</object_storage_source>
</disks>
</storage_configuration>
Expand Down

0 comments on commit 2b08599

Please # to comment.