Altinity / Altinity/helm-charts
Incorrect replica/keeper validation logic — checks `keeper.enabled` instead of actual replica count
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 57
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
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: truebut 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".
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at clickhouse/templates/chi.yaml:218:3 and inspect the replica and Keeper validation referenced by the error. Reproduce the issue with values containing keeper.enabled: true but no replicaCount or Keeper hosts, then verify that invalid configurations fail while valid replica and Keeper settings pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100