From 42546d26c7b108c00fb8d5da625b39a456c3db3b Mon Sep 17 00:00:00 2001 From: Mikhail Koviazin Date: Tue, 17 Nov 2026 15:56:15 +0100 Subject: [PATCH 1/2] tests: drop CAS log configs on installed-binary nodes Integration instances with `with_installed_binary` run the binary of their image, but get the main config of this checkout. It has the Antalya-only `cas_log` and `cas_gc_log` sections, so a recent upstream binary refuses to start with `UNKNOWN_ELEMENT_IN_CONFIG`, and the test times out waiting for the instance. This breaks `test_custom_s3_disk_remote_url_allow_hosts` on `antalya-26.8` and `test_create_union_system_log_tables` in the 26.8.37 bump. Remove both sections from such instances by default. An instance whose image knows them, like the Antalya node of `test_cas_ref_move_compat`, keeps them with `installed_binary_supports_cas_logs=True`. Related: https://github.com/Altinity/ClickHouse/pull/2870#issuecomment-6948872234 --- .../integration/helpers/0_common_remove_cas_logs.xml | 4 ++++ tests/integration/helpers/cluster.py | 12 ++++++++++++ tests/integration/test_cas_ref_move_compat/test.py | 1 + 3 files changed, 17 insertions(+) create mode 100644 tests/integration/helpers/0_common_remove_cas_logs.xml diff --git a/tests/integration/helpers/0_common_remove_cas_logs.xml b/tests/integration/helpers/0_common_remove_cas_logs.xml new file mode 100644 index 0000000000000..a9ee6e7146cc2 --- /dev/null +++ b/tests/integration/helpers/0_common_remove_cas_logs.xml @@ -0,0 +1,4 @@ + + + + diff --git a/tests/integration/helpers/cluster.py b/tests/integration/helpers/cluster.py index e6e4523b73ec5..226859fc1baa6 100644 --- a/tests/integration/helpers/cluster.py +++ b/tests/integration/helpers/cluster.py @@ -2258,6 +2258,7 @@ def add_instance( ipv4_address=None, ipv6_address=None, with_installed_binary=False, + installed_binary_supports_cas_logs=False, external_dirs=None, tmpfs=None, mem_limit=None, @@ -2290,6 +2291,8 @@ def add_instance( with_zookeeper - if True, add ZooKeeper configuration to configs and ZooKeeper instances to the cluster. with_zookeeper_secure - if True, add ZooKeeper Secure configuration to configs and ZooKeeper instances to the cluster. extra_configs - config files cannot put into config.d and users.d + installed_binary_supports_cas_logs - with `with_installed_binary`, keep the `cas_log` and `cas_gc_log` + sections of the main config. The binaries of other images reject them as unknown elements. """ if self.is_up: @@ -2406,6 +2409,7 @@ def add_instance( ipv4_address=ipv4_address, ipv6_address=ipv6_address, with_installed_binary=with_installed_binary, + installed_binary_supports_cas_logs=installed_binary_supports_cas_logs, external_dirs=external_dirs, tmpfs=tmpfs or [], mem_limit=mem_limit, @@ -5191,6 +5195,7 @@ def __init__( ipv4_address=None, ipv6_address=None, with_installed_binary=False, + installed_binary_supports_cas_logs=False, external_dirs=None, tmpfs=None, mem_limit=None, @@ -5365,6 +5370,7 @@ def __init__( self.ipv4_address = ipv4_address self.ipv6_address = ipv6_address self.with_installed_binary = with_installed_binary + self.installed_binary_supports_cas_logs = installed_binary_supports_cas_logs self.is_up = False self.config_root_name = config_root_name self.docker_init_flag = use_docker_init_flag @@ -6572,6 +6578,12 @@ def write_embedded_config(name, dest_dir, fix_log_level=False): "0_common_min_cpu_busy_time.xml", self.config_d_dir ) + # The main config comes from this checkout and has the Antalya-only `cas_log` and `cas_gc_log` + # sections. The binary of an older or upstream image rejects them as unknown elements and does not start. + # The sections stay removed if `restart_with_latest_version` later switches the instance to the tested binary. + if self.with_installed_binary and not self.installed_binary_supports_cas_logs: + write_embedded_config("0_common_remove_cas_logs.xml", self.config_d_dir) + use_old_analyzer = os.environ.get("CLICKHOUSE_USE_OLD_ANALYZER") is not None use_distributed_plan = ( os.environ.get("CLICKHOUSE_USE_DISTRIBUTED_PLAN") is not None diff --git a/tests/integration/test_cas_ref_move_compat/test.py b/tests/integration/test_cas_ref_move_compat/test.py index 01f35f338fae0..76aa24d9cbede 100644 --- a/tests/integration/test_cas_ref_move_compat/test.py +++ b/tests/integration/test_cas_ref_move_compat/test.py @@ -16,6 +16,7 @@ def start_cluster(): image="altinity/clickhouse-server", tag=OLD_TAG, with_installed_binary=True, + installed_binary_supports_cas_logs=True, with_rustfs=True, stay_alive=True, ) From 09ec4d2560a07b683aaf99d03cd6efee618cbeae Mon Sep 17 00:00:00 2001 From: Mikhail Koviazin Date: Tue, 17 Nov 2026 16:12:12 +0100 Subject: [PATCH 2/2] tests: assert the old CAS node keeps its CAS log Nothing checked that `installed_binary_supports_cas_logs=True` keeps the `cas_log` section on the Antalya node of `test_cas_ref_move_compat`: the test reads `system.cas_log` only on the new node, so it would still pass if the harness removed the section. Count the old node's CAS log rows after its first insert. --- tests/integration/test_cas_ref_move_compat/test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/test_cas_ref_move_compat/test.py b/tests/integration/test_cas_ref_move_compat/test.py index 76aa24d9cbede..c8f8f8707e80c 100644 --- a/tests/integration/test_cas_ref_move_compat/test.py +++ b/tests/integration/test_cas_ref_move_compat/test.py @@ -44,6 +44,8 @@ def test_old_pool_floor_and_old_reader(start_cluster): # Pool created by the old build (reader floor 1). old.query("CREATE TABLE t_old (a UInt64) ENGINE = MergeTree ORDER BY a SETTINGS storage_policy = 'cas_shared'") old.query("INSERT INTO t_old SELECT number FROM numbers(100)") + # The old build knows the CAS logs, so its instance keeps them (`installed_binary_supports_cas_logs`). + assert _count(old, "1") > 0 # The new build mounts it: the first writable mount raises the floor to 2 before any rename, so the # new build's first rename is already an owner move. The server is stopped while the disk config lands: