Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MDB-32251] Skip access checks for cloud storage disk of source cluster #199

Merged
merged 1 commit into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading