Giter Club home page Giter Club logo

Comments (13)

grahamwhaley avatar grahamwhaley commented on July 24, 2024 1

@krsna1729 @ganeshmaharaj - adding to reset_stack.sh is the ideal, because that is notionally when you want to do that cleanup... but, that is harder as you have to get all the ssh setup etc.
That's why I was suggesting adding it to the setup_system.sh as a sort of 'pre-sanity clean check`, as the time this presents as a real problem is when re-installing a node, so that script would be run, and can clean up any old rook dirs before trying to re-install anew. Much easier to code up.

from cloud-native-setup.

krsna1729 avatar krsna1729 commented on July 24, 2024

@grahamwhaley
Is this already addressed with the reset script?
https://github.com/clearlinux/cloud-native-setup/blob/master/clr-k8s-examples/reset_stack.sh#L40

from cloud-native-setup.

ganeshmaharaj avatar ganeshmaharaj commented on July 24, 2024

from cloud-native-setup.

krsna1729 avatar krsna1729 commented on July 24, 2024

Yup added complexity. kubectl, awk, xargs, ssh should be enough

from cloud-native-setup.

grahamwhaley avatar grahamwhaley commented on July 24, 2024

I was thinking just last night, maybe we can add it to the setup_system.sh script, as that is run on every node. And, although you don't technically need to run it a second time on a node to re-join a cluster, in my ansible scripts I do, and we could mandate that you must run the setup_system.sh script before each join.

Or, yes, we could write a small clean_node.sh or unjoin_node.sh script that does the kubeadm reset -f on the node followed by removal of the rook lib dir. (I have an ansible that does a host side drain followed by those actions on the node(s)).

from cloud-native-setup.

krsna1729 avatar krsna1729 commented on July 24, 2024

@mcastelino

from cloud-native-setup.

krsna1729 avatar krsna1729 commented on July 24, 2024

@grahamwhaley we can just run the reset_stack.sh right? Can we close this?

from cloud-native-setup.

ganeshmaharaj avatar ganeshmaharaj commented on July 24, 2024

@krsna1729 would be nice to add logic to clean /var/lib/rook from all the nodes. Maybe find list of nodes when reset_stack.sh is called and do the ssh + delete at the end of the script after kube is reset?

from cloud-native-setup.

krsna1729 avatar krsna1729 commented on July 24, 2024

@grahamwhaley add it to setup_system.sh with a TODO to remove it in future. From rook documentation -

Connect to each machine and delete /var/lib/rook, or the path specified by the dataDirHostPath.
In the future this step will not be necessary when we build on the K8s local storage feature.

from cloud-native-setup.

jascott1 avatar jascott1 commented on July 24, 2024

Im not set against but seems like it should be in reset_stack.sh and called by something like Ansible for each node. IMO we should not implement multi-node management in bash just to remove /var/lib/rook. It also leaves it decoupled for user to use the tool of their choice.

from cloud-native-setup.

ahsan518 avatar ahsan518 commented on July 24, 2024

Should we add this in Ansible, or make the changes in the script ?

from cloud-native-setup.

knangia avatar knangia commented on July 24, 2024

We have this https://github.com/clearlinux/cloud-native-setup/blob/master/clr-k8s-examples/reset_stack.sh#L43 in reset_stack script already.

from cloud-native-setup.

knangia avatar knangia commented on July 24, 2024

closing this, please feel free to open this if still active.

from cloud-native-setup.

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.