Comments (4)
After playing around it looks like the correct way to handle this scenario is to:
- Enable the advanced statefulset when installing the operator
- To remove basic-tikv-2, edit the
TidbCluster
CR and change tikv.statefulset.replicas to the desired number (5) and set theannotations.tikv.tidb.pingcap.com/delete-slots: '[2]'
.
Note the documentation here says to set tikv.replicas
to the 5, which doesn't help in this scenario.
Would someone be able to confirm what I've just written? I think it would be useful to update the documentation to detail how to remove a failed pods.
from tidb-operator.
To remove a failed TiKV, if you don't want to use Advanced StatefulSet, the correct way is:
I can do this by removing the PVC for tikv-2, removing the store using pd-ctl unsafe remove-failed-stores and then restarting basic-tikv-2.
If you want to use Advanced StatefulSet, the correct way is:
Enable the advanced statefulset when installing the operator; set the annotations.tikv.tidb.pingcap.com/delete-slots: '[2]'
There is no need to change the tikv.replicas
.
Note the documentation here says to set tikv.replicas to the 5, which doesn't help in this scenario.
Do you have any details about this?
from tidb-operator.
To remove a failed TiKV, if you don't want to use Advanced StatefulSet, the correct way is...:
Apologies! I've just retried this and setting the annotation does seem to do the correct thing. Maybe I didn't wait long enough.
One further question. If I am using TiKV with local storage and I remove a failed TiKV via the Advanced StatefulSet annotation should I also use pd-ctl unsafe remove-failed-stores
to remove the store? If so is it better to use remove-failed-store
before or after setting the statefulset annotation?
Thanks.
from tidb-operator.
If I am using TiKV with local storage and I remove a failed TiKV via the Advanced StatefulSet annotation should I also use pd-ctl unsafe remove-failed-stores to remove the store? If so is it better to use remove-failed-store before or after setting the statefulset annotation?
You can use remove-failed-store after setting the statefulset annotation
from tidb-operator.
Related Issues (20)
- br: `.spec.pause` is missing from backupschedule manifest after backup is created HOT 5
- How to use Backup CR to backup tidb to aliyun OSS? HOT 4
- tikv upgrade blocked
- can't set MaxSkew, MinDomains or NodeAffinityPolicy for TopologySpreadConstraint
- Release v1.5.3
- tidb-scheduler pod keep crashing with TiDB Operator v1.5.3 HOT 3
- support setting extra command line arguments for TiDB
- BR backup could raise error when PD leader changed during BR initialization HOT 3
- BackupCR(7.5.1) can not read the correct size of backup in minio HOT 5
- backup: support multiple backup schedules
- Volume leaked if volume restore failed in restore volume step
- Release 1.6.0
- TiDB Cluster Does Not Survive K8s Upgrade (EKS) or Nodegroup Upgrade HOT 3
- TiDB Operator Crash HOT 1
- operator tries to shrink volume after storage size update if value is in Mi HOT 5
- Documentation for operator features HOT 2
- Support PITR restore using --start-ts only
- If store number is 0, it is expected to set the volume backup to failed which will not blocked the whole clean schedule
- Can't change tiproxy service type HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tidb-operator.