Giter VIP home page Giter VIP logo

Comments (6)

tangcong avatar tangcong commented on May 20, 2024

We didn't use etcd-operator, we used the built-in kstone-etcd-operator.It has more complete support for persistent storage and better disaster tolerance. In the next version, we will support rebuilding lost-quorum clusters using snapshots, and kstone-dashboard will also support visualization operations.

from kstone.

rayliu419 avatar rayliu419 commented on May 20, 2024

Hi tangcong, thanks for your reply. 

Based on the official wiki:

https://etcd.io/docs/v3.5/op-guide/runtime-configuration/# restart-cluster-from-majority-failure

When we use a dynamic way to deploy Etcd clusters(That's how it works in K8s), it appears that the only way to rebuild a lost-quorum cluster is to take a snapshot. The problem of snapshots is that if we use a snapshot to recover, we'll definitely lose some data(after the snapshot is taken, some new update are write to etcd, then k8s cluster is down). 
If use the static way to build a etcd cluster, I can simply restart all nodes to rebuild the etcd cluster without using snapshot, do you have some ideas about how to achive it if we use dynamic way?

from kstone.

tangcong avatar tangcong commented on May 20, 2024

We support storing data on persistent data disks. If it is not persistent, we can also force a snapshot from the healthy node to rebuild the cluster, so that the probability of losing data is very small. @rayliu419

from kstone.

rayliu419 avatar rayliu419 commented on May 20, 2024

@tangcong ,

"We support storing data on persistent data disks. If it is not persistent"
I think most of k8s users will use PVC/PV as external storage, so that's not a problem. The problem is even if you have persistent data disks, you can't restore the cluster with these persistent data disks just as static way.

"we can also force a snapshot from the healthy node to rebuild the cluster, so that the probability of losing data is very small."
Yes, we can force the health node to dump snapshot, but here are two problems:

  1. Since etcd cluster continue to accept write all the time, you can't snapshot all writes, right?
  2. In some cases, such as k8s is down, you don't have a healthy node.

Actually, I don't know why etcd community doesn't have a solution to recover it without using snapshot(maybe they have, but I don't find it). In cloudnative enviorment, it's a critical case.

from kstone.

rayliu419 avatar rayliu419 commented on May 20, 2024

I think I find a way to recover the data without losing data. Etcd supports --force-new-cluster to reconfigure the cluster, we can find the latest node in the etcd cluster to restart the cluster. If more than half pvc survive, we can recover it in this way.

from kstone.

tangcong avatar tangcong commented on May 20, 2024

Yes, I submitted an issue #kstone-io/kstone-etcd-operator#2 at the time, and the plan was implemented in this way. thank you.

from kstone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.