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

[BUG] Multi-shard Clickhouse cluster configuration not rendered properly #1390

Closed
hunterlodge opened this issue Jan 8, 2025 · 1 comment · Fixed by #1393
Closed

[BUG] Multi-shard Clickhouse cluster configuration not rendered properly #1390

hunterlodge opened this issue Jan 8, 2025 · 1 comment · Fixed by #1393
Assignees

Comments

@hunterlodge
Copy link

hunterlodge commented Jan 8, 2025

Describe the bug
When a multi-shard clickhouse cluster is created, each shard actually operates independently. I think this is due to the configuration file is not rendered properly with all shards included.

To Reproduce
Steps to reproduce the behavior:

  1. set up a clickhouse cluster with more than one shard. My setup is as follows:
# k get cluster && kc get cmp && kc get instanceset && kc get pods
NAME            CLUSTER-DEFINITION   TERMINATION-POLICY   STATUS    AGE
ch-v1-cluster                        Delete               Running   3d19h
NAME                      DEFINITION                           SERVICE-VERSION   STATUS    AGE
ch-v1-cluster-ch-keeper   clickhouse-keeper-24-1.0.0-alpha.1   22.9.4            Running   3d19h
ch-v1-cluster-shard-wv8   clickhouse-24-1.0.0-alpha.1          22.9.4            Running   3d19h
ch-v1-cluster-shard-z7b   clickhouse-24-1.0.0-alpha.1          22.9.4            Running   3d19h
NAME                      LEADER   READY   REPLICAS   AGE
ch-v1-cluster-ch-keeper            3       3          3d19h
ch-v1-cluster-shard-wv8            3       3          3d19h
ch-v1-cluster-shard-z7b            3       3          3d19h
NAME                        READY   STATUS    RESTARTS   AGE
ch-v1-cluster-ch-keeper-0   1/1     Running   0          3d19h
ch-v1-cluster-ch-keeper-1   1/1     Running   0          3d19h
ch-v1-cluster-ch-keeper-2   1/1     Running   0          3h19m
ch-v1-cluster-shard-wv8-0   1/1     Running   0          3d19h
ch-v1-cluster-shard-wv8-1   1/1     Running   0          3d19h
ch-v1-cluster-shard-wv8-2   1/1     Running   0          3h6m
ch-v1-cluster-shard-z7b-0   1/1     Running   0          3d19h
ch-v1-cluster-shard-z7b-1   1/1     Running   0          2d23h
ch-v1-cluster-shard-z7b-2   1/1     Running   0          3h5m
  1. check the 00_default_overrides.xml under /etc/clickhouse-server/conf.d on a shard pod.

Expected behavior
This xml should have multiple sections of <shard> since each pod should be aware of its peers by this configuration file.

Screenshots
image

Additional context

@shanshanying
Copy link
Contributor

@loomts PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants