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

Delete chaosresults as part of cleanup. #396

Open
rbalagopalakrishna opened this issue Jun 30, 2021 · 4 comments
Open

Delete chaosresults as part of cleanup. #396

rbalagopalakrishna opened this issue Jun 30, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@rbalagopalakrishna
Copy link

BUG REPORT

What happened:
Deleting the chaosengine is only deleting the pods(runner, helper, experiment pod)which are being created during the chaos test.

What you expected to happen:
It should also delete the chaosresults from the test.

#kubectl delete chaosengine -n litmus network-chaos-1 network-chaos-2
chaosengine.litmuschaos.io "network-chaos-1" deleted
chaosengine.litmuschaos.io "network-chaos-2" deleted

#kubectl get pods -n litmus
NAME                                READY   STATUS    RESTARTS   AGE
chaos-operator-ce-c7cc65966-zz5n4   1/1     Running   0          6h57m

#kubectl get chaosresults -n litmus
NAME                                  AGE
network-chaos-1-pod-network-latency   5m9s
network-chaos-2-pod-network-latency   3m26s```
@ksatchit
Copy link
Member

chaosresult is a dedicated custom resource @rbalagopalakrishna . There is a case for it to exist independently (of chaosengine or its associated pods) in order to track failure/success history or generate some useful reports.

IMO a custom script/post-hook can be set up in case you are interested to remove them.

@mdnyeemakhtar
Copy link

@ksatchit in our use case we are generating chaosengine name and it is unique for each execution so it generates new chaosresult each time. And so no history maintained in that case. We want the results to be delete along with engine. As of now we are doing it the way you suggested by custom script. However, we want a more robust and integrated solution for it in engine itself.
Can there be a flag in engine to delete results along with engine? By default it can be set to false and if someone (like us) needs it then they can enable it.

@ksatchit
Copy link
Member

ksatchit commented Jul 1, 2021

@mdnyeemakhtar I see. That is an interesting case. Let me get back on this.

@mdnyeemakhtar
Copy link

@mdnyeemakhtar I see. That is an interesting case. Let me get back on this.

Thank you @ksatchit

@ispeakc0de ispeakc0de added the enhancement New feature or request label Oct 12, 2022
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
None yet
Development

No branches or pull requests

4 participants