pingcap / pingcap/tidb-operator

Operator can not evict leader after add label in tikv-sts.spec.template.metadata.labels twice

Open
#5,217 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.3k
Forks
540
Avg merge
3d 2h
Merged PRs (30d)
18

Description

Bug Report

What version of Kubernetes are you using?

Client: v1.27.1
EKS server: v1.24

What version of TiDB Operator are you using?

v1.4.1

What storage classes exist in the Kubernetes cluster and what are used for PD/TiKV pods?

What's the status of the TiDB cluster pods?

What did you do?

internal reproduce doc: https://pingcap.feishu.cn/docx/JLTDdyjnmovExexCrLFcsrNNneJ

  • We can request customer do not manually change low level resource like sts, but we can not prevent it
  • Operator can handle this case at first time, it's better if it can handle this case in twice time.

What did you expect to see?
Operator evict leader is blocked

What did you see instead?
Operator evict leader is not blocked

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 with the internal reproduction document and reproduce the behavior involving duplicate labels in tikv-sts.spec.template.metadata.labels. Trace how the operator handles leader eviction after the label is added twice; done means the operator blocks leader eviction consistently in both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.