Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

farosctl destroy container-storage #94

Open
rmkraus opened this issue Oct 31, 2020 · 3 comments
Open

farosctl destroy container-storage #94

rmkraus opened this issue Oct 31, 2020 · 3 comments
Labels
enhancement New feature or request
Projects
Milestone

Comments

@rmkraus
Copy link
Member

rmkraus commented Oct 31, 2020

delete namespace openshift-storage
rm -rf /var/lib/rook on storage nodes
wipefs

@rmkraus rmkraus created this issue from a note in Roadmap (In Work) Oct 31, 2020
@rmkraus rmkraus added the enhancement New feature or request label Oct 31, 2020
@rmkraus rmkraus moved this from In Work to Upcoming in Roadmap Nov 18, 2020
@rmkraus rmkraus moved this from Upcoming to In Work in Roadmap Dec 3, 2020
@jharmison-redhat
Copy link
Member

I thought about doing this today, but didn't think of a good way around the problem of hanging dependent objects. Clearing the finalizers from broken StorageClusters and other CRDs from failed installs is bound to be a manual process.

I can work through completing this action in a healthy cluster (tearing down each element and waiting for the operators to gracefully finalize), but I think the command is more intended for unhealthy clusters.

Is your heart set on automating this for even unhealthy OCS deployments?

@rmkraus
Copy link
Member Author

rmkraus commented Mar 26, 2021

Listing stuck resources

oc api-resources --verbs=list --namespaced -o name | xargs -n 1 oc get --show-kind --ignore-not-found -n openshift-storage | grep -v ^packagemanifest.packages.operators.coreos.com | grep -v ^NAME | awk '{ print $1 }'

Attempt forceful delete

oc delete --grace-period=0 --force --wait=false storagecluster.ocs.openshift.io/ocs-storagecluster

Remove Finalizers

oc patch storagecluster.ocs.openshift.io/ocs-storagecluster --type=merge -p '{"metadata": {"finalizers": null}}'

@rmkraus rmkraus moved this from In Work to Upcoming in Roadmap Jun 22, 2021
@rmkraus
Copy link
Member Author

rmkraus commented Aug 8, 2021

One command to rule them all.

export NAMESPACE=openshift-storage; oc api-resources --verbs=list --namespaced -o name | xargs -n 1 oc get --show-kind --ignore-not-found -n $NAMESPACE 2>/dev/null | grep -v ^packagemanifest.packages.operators.coreos.com | grep -v ^NAME | awk '{ print $1 }' | xargs -rI % oc patch % --type=merge -p '{"metadata": {"finalizers": null}}' -n $NAMESPACE

@rmkraus rmkraus moved this from Upcoming to In Work in Roadmap Aug 9, 2021
@rmkraus rmkraus modified the milestones: 4.8.0, 4.8.1 Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Roadmap
  
In Work
Development

No branches or pull requests

2 participants