Giter Site home page Giter Site logo

Comments (11)

JuniusLuo avatar JuniusLuo commented on May 21, 2024

yes, this will be general process to replace the bad volume for the service.

Wondering how the volume gets deleted. FireCamp will not delete the volume, even when you delete the service. Did you accidentally delete the volume?

from firecamp.

jazzl0ver avatar jazzl0ver commented on May 21, 2024

yes, this will be general process to replace the bad volume for the service.

I'm sorry - did not get this. What is the general process?

Yeah, that was my lame hands :)

from firecamp.

JuniusLuo avatar JuniusLuo commented on May 21, 2024

I'm sorry - did not get this. What is the general process?
Replacing the bad volume is the common feature. It is not for cassandra only. It will work for all services.

from firecamp.

jazzl0ver avatar jazzl0ver commented on May 21, 2024

Could you please give me some guidance on how to do that?

from firecamp.

jazzl0ver avatar jazzl0ver commented on May 21, 2024

Please, shed some light on where the stack keeps volumes ID? It's really hard to find..

from firecamp.

JuniusLuo avatar JuniusLuo commented on May 21, 2024

This is not a simple work.

Replacing the volume is easy. The bad volume id could be passed in as the parameter. The manage server could list all ServiceMember of the service, find out the bad volume belongs to which member, create a new volume and replace the bad volume in the service member. The volume plugin will automatically pick up the new volume.

While, things are more complex for each service, as different services have different internal mechanism. We need to follow and revise Cassandra's procedure. If the data volume fails, the cassandra node needs to be replaced, refer to https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsReplaceNode.html. If the journal volume fails, we might be able to simply replace the volume and do node repair, refer to https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsRecoverUsingJBOD.html. If the node repair fails, we have to switch back to replace the node.

from firecamp.

JuniusLuo avatar JuniusLuo commented on May 21, 2024

Let's try the simple solution first. We could add code to simply replace the cassandra volume. After the container starts, use cql to login to that container and run nodetool repair -full -local -seq. If repair succeeds, check the data consistency from the application. If everything is good, then we fix the issue for now. If not, you will have to recreate the Cassandra service. We will support the Cassandra node replacement later.

from firecamp.

jazzl0ver avatar jazzl0ver commented on May 21, 2024

@JuniusLuo , that would be great! Looking forward for this to be implemented!
And thank you for the detailed answers!

from firecamp.

JuniusLuo avatar JuniusLuo commented on May 21, 2024

We added one tool to replace the volume for service. When the total solution is ready, we could remove this tool. You could get the tool from https://s3.amazonaws.com/cloudstax/firecamp/releases/latest/packages/firecamp-volume-replace.tgz

Recovery step:

  1. create a new volume in the same availability zone.
  2. run the tool: firecamp-volume-replace -cluster=t1 -service=mycas -bad-volumeid=xxx -new-volumeid=xxx
  3. login to the Cassandra node. For example, if the first member is bad, cqlsh mycas-0.t1-firecamp.com -u newsuperuser -p super
  4. run nodetool repair -full -local -seq
    If nodetool print out something like below, the repair succeeds. Go ahead and check the application.
[2017-12-13 23:02:33,585] Repair completed successfully
[2017-12-13 23:02:33,589] Repair command #1 finished in 0 seconds
  1. check the application data consistency.

from firecamp.

jazzl0ver avatar jazzl0ver commented on May 21, 2024

@JuniusLuo, worked like a charm! Thank you so much!

from firecamp.

JuniusLuo avatar JuniusLuo commented on May 21, 2024

Cool. Glad it works.

from firecamp.

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.