Altinity / Altinity/clickhouse-operator

Empty topology key for `CircularReplication`

Open
#1,352 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
Go
Stars
2.6k
Forks
574
Avg merge
8d 6h
Merged PRs (30d)
6

Description

Warning  FailedCreate  7m47s (x18 over 18m)  statefulset-controller  create Pod chi-ch-ms1-cluster-0-0-0 in StatefulSet chi-ch-ms1-cluster-0-0 failed error: Pod "chi-ch-ms1-cluster-0-0-0" is invalid: [spec.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[0].topologyKey: Required value: can not be empty ...

Here the TopologyKey field is not assigned:
https://github.com/Altinity/clickhouse-operator/blob/df26023f32e2b1f4b6812635221546e0bf35fb43/pkg/model/chi/normalizer.go#L763-L784

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pkg/model/chi/normalizer.go at lines 763-784 and trace how CircularReplication builds the required pod affinity. Reproduce or inspect the reported StatefulSet validation error, then verify that the generated topologyKey is populated and the affected pod can be created without the empty-key error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.