Repository navigation
Fix ATTACH for S3 disks created without 'remote_url_allow_hosts - #124930
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Workflow [PR], commit [2e8c3b0] Summary: ✅
AI ReviewSummaryThis PR narrows the PR Metadata
Findings
Final VerdictChanges requested: the startup / |
… for the disk check Two paths still enforced `remote_url_allow_hosts` on definitions that the server stored itself: - Databases at server start. `loadDatabase` runs the stored `ATTACH DATABASE` with `create = true`, so `setForceAttach` is skipped and the mode is `ATTACH`, not `FORCE_ATTACH`. The server did not start in CI with a database whose metadata disk points to an endpoint outside the list. The signal for this path is `is_metadata_replay`. - A short `ATTACH TABLE t` or `ATTACH DATABASE db` reads the definition back from the metadata file and marks it with `attach_short_syntax`, while the mode is `ATTACH`. `DatabaseFactory::Arguments::isLoadingFromExistingMetadata` combines the mode, `is_metadata_replay` and `attach_short_syntax` for the database metadata disk. `registerStorageMergeTree` adds `attach_short_syntax` to the mode for tables. A user `ATTACH` with a full definition keeps `attach_short_syntax` false and stays enforced. The log line, the `system.warnings` text, the comments and the docs name the third event. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…`DETACH PERMANENTLY` In an `Atomic` database a full-definition `ATTACH TABLE` needs a `UUID`; without it the query fails with `INCORRECT_QUERY` before the disk is built, which is what CI reported. The case now passes a `UUID` and expects `UNACCEPTABLE_URL`. A table detached permanently before the upgrade has no disk at server start, so the short `ATTACH TABLE t_detached` on the new binary is the first creation of its disk: it must be accepted and reported. The database case adds a `DETACH DATABASE` / `ATTACH DATABASE` cycle and uses the default restart wait. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes104 object files changed (+57.09 KiB total), 0 added.
719 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units1335 translation units recompiled, 8416 s compile time in total, 1335 of them have a recent master baseline. |
…sk-remote-host-filter-on-load
…sk-remote-host-filter-on-load
…rt and `UNDROP` The previous commit set the `is_loading_from_existing_metadata` flag for a short `ATTACH TABLE t` / `ATTACH DATABASE db`. That flag is shared by every custom-disk check (`dynamic_disk_allow_*`, the server-credentials marker, the local-paths check, the disk-name and settings-hash checks), so the change silenced all of them for the short form, not only the host filter. The host filter now follows the other disk checks: skipped when the server replays metadata it stored itself, at start (`is_metadata_replay`, mode `FORCE_ATTACH` / `FORCE_RESTORE`) and on `UNDROP`, enforced for every user `ATTACH`, short or with a definition. A table parked with `DETACH ... PERMANENTLY` before the upgrade gets `UNACCEPTABLE_URL` on its first `ATTACH` until the operator adds the `<s3_bucket>` entry; `DETACH` and `ATTACH` in a running server reuse the disk built at start and are not affected. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…er the entry is added The permanently detached table now expects `UNACCEPTABLE_URL` on its first `ATTACH`, consistent with `CREATE` and with a full-definition `ATTACH`. The test then adds `<s3_bucket>minio1:9001/root</s3_bucket>` to the allow-list, reloads the config and attaches the table without a restart. The `DETACH DATABASE` / `ATTACH DATABASE` cycle stays as a check that a reused metadata disk is not re-validated. Co-Authored-By: Claude Fable 5.1 <[email protected]>
A table dropped before the upgrade stays in the drop queue and is rebuilt at server start from `metadata_dropped` under `FORCE_RESTORE`. The test drops a table on a third disk before the restart, checks that two disks were reported, and runs `UNDROP TABLE` on the new binary. The drop delay is raised to one hour in the test config so the queue survives a slow restart under sanitizers. The docs sentence now says what the code does: the exemption is the rebuild at start, which is what keeps `UNDROP TABLE` working. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…mote_url_allow_hosts
Cherry pick #124930 to 26.7: Fix ATTACH for S3 disks created without 'remote_url_allow_hosts
…mote_url_allow_hosts
Cherry pick #124930 to 26.8: Fix ATTACH for S3 disks created without 'remote_url_allow_hosts
…mote_url_allow_hosts
Cherry pick #124930 to 26.9: Fix ATTACH for S3 disks created without 'remote_url_allow_hosts
…mote_url_allow_hosts
Backport #124930 to 26.9: Fix ATTACH for S3 disks created without 'remote_url_allow_hosts
Backport #124930 to 26.8: Fix ATTACH for S3 disks created without 'remote_url_allow_hosts
Backport #124930 to 26.7: Fix ATTACH for S3 disks created without 'remote_url_allow_hosts
Backport #124930 to 26.3: Fix ATTACH for S3 disks created without 'remote_url_allow_hosts
….8.26.12 The test needs an old server that does not check SQL-defined disks against `remote_url_allow_hosts`, and took it from the moving tag `clickhouse/clickhouse-server:26.8`. Since `26.8.28.14` (2026-10-15) that tag contains the 26.8 backports of ClickHouse#124453 (ClickHouse#125789) and ClickHouse#124930 (ClickHouse#125821), so the old server rejects the test's first setup CREATE with `Code: 491 UNACCEPTABLE_URL` before any upgrade, and both tests fail on master. Pin both instances to `26.8.26.12`, which predates both backports. This makes the file byte-identical to the 26.8 branch copy, which already pins this tag. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rl-allow-hosts Resolve the conflict with ClickHouse#124930, which replaced the `bool` remote host filter flag with `RemoteHostFilterCheck`. Query-created Azure disks now follow the same policy as S3 disks: a rejection throws for `Enforce` (a query) and is only reported for `Warn` (existing metadata at server start or `UNDROP`), through the same log line and `system.warnings` entry, generalized to name an `<s3_bucket>` or `<host>` entry. `test_endpoint_host_filter_on_restart` now expects the table to load with the warning after a restart, and a new disk on the same host to be rejected. Co-Authored-By: Claude Opus 5.5 <[email protected]>
closes: #124872
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed loading, short
ATTACH, andUNDROP TABLEfor existing SQL-defined S3 disks whose endpoints are absent fromremote_url_allow_hosts; new full-definitionCREATEandATTACHstill reject disallowed endpoints.Workflow [PR]
Sync PR [sync-upstream/pr/124930]
Version info
26.10.1.2314-master(included in26.10and later)26.9.19.15,26.8.28.7,26.7.31.9,26.3.52.10