Skip to content

Incorrect replica/keeper validation logic — checks keeper.enabled instead of actual replica count #104

@Elmo33

Description

@Elmo33

Updating shards fails with:

Error: UPGRADE FAILED: execution error at (clickhouse/templates/chi.yaml:218:3): When 'clickhouse.replicasCount' > 1, either 'keeper.enabled' must be true or 'clickhouse.keeper.host' must be set.

The logic is flawed.

Current behavior:

  • The chart only triggers this validation when keeper.enabled: false.
  • If keeper.enabled: true but no actual replicaCount is set (or is not >=1), the validation silently passes.
  • This results in a deployment where keeper is “enabled” but the chart never configures any keeper hosts, causing runtime failures like:
Exception: Unexpected error creating database:
Coordination::Exception: Cannot resolve any of provided ZooKeeper hosts due to DNS error. (KEEPER_EXCEPTION)
(query: CREATE DATABASE IF NOT EXISTS test_replication_db ON CLUSTER '{cluster}')

Example values causing failure:

keeper:
  enabled: true

No replicaCount or keeper hosts → chart pretends everything is fine → ClickHouse blows up because it cannot resolve ZK hosts.

Expected behavior:
The validation should check:

  • clickhouse.replicasCount >= 1
  • AND if replicas > 1 → keeper must be properly configured (enabled and with valid hosts), not merely "enabled: true".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions