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

clean up raycluster instances at chart uninstall #698

Merged
merged 4 commits into from
Aug 2, 2023

Conversation

akihikokuroda
Copy link
Collaborator

@akihikokuroda akihikokuroda commented Jun 21, 2023

Summary

fix: #695

Details and comments

Add pre-delete hook that deletes all remaining raycluster instances at helm uninstall.

@Tansito
Copy link
Member

Tansito commented Jun 21, 2023

This is quite interesting. Do we want to remove all ray-clusters in pre-install? Thinking that experiments usually takes a lot of time and we will find situations where we should not delete a cluster from a client. Am I missing something?

@akihikokuroda
Copy link
Collaborator Author

We install and delete the Ray operator that creates and deletes that ray cluster based on the raycluster CRD instances. We don't allow the others to manipulate the instances in the namespace. So I think that it's safe and good to delete all in the namespace.

@Tansito
Copy link
Member

Tansito commented Jun 21, 2023

But for example, if a user is running an experiment and we make a helm upgrade in our cluster does that mean that we are going to remove all the clusters included the one that is running the experiment?

@akihikokuroda
Copy link
Collaborator Author

The helm has different hooks for the upgrade. The pre-delete hook is executed only at uninstall.

@psschwei
Copy link
Collaborator

@Tansito @akihikokuroda -- where did we land on merging this?

@akihikokuroda
Copy link
Collaborator Author

So far this doesn't get consensus so I can close or I can update to delete the instances only has the label.

@psschwei
Copy link
Collaborator

I recall running into issues trying to uninstall and reinstall the Helm chart (for local dev, I usually just kill the cluster and start over if I need to redeploy), so I'd be interested in seeing it merge.

@akihikokuroda
Copy link
Collaborator Author

I'll work to change only remove the labeled instance. @Tansito What do you think?

Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
@psschwei
Copy link
Collaborator

I'll work to change only remove the labeled instance. @Tansito What do you think?

My preference would be to just delete everything -- if we're uninstalling the Helm chart, I would think we want to clean up everything that's out there and not leave any orphans hanging. And if the pre-delete hook only gets called if we uninstall (and not when we upgrade), then I think we should be ok.

@akihikokuroda
Copy link
Collaborator Author

@psschwei OK. The helm chart install / uninstall the CRD so I agree it's OK to delete everything at uninstall. I'll make the change.

Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Copy link
Collaborator

@psschwei psschwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

/assign @Tansito

@Tansito
Copy link
Member

Tansito commented Jul 27, 2023

I'm back! As soon as I finish to read everything I will start reviewing this, thanks @akihikokuroda and @psschwei as always ❤️

@Tansito
Copy link
Member

Tansito commented Aug 2, 2023

@akihikokuroda pffff sorry, I left some comments pending a lot of days ago but I didn't submit them (I don't know what happened 🤷‍♂️ )

Signed-off-by: Akihiko Kuroda <akihikokuroda2020@gmail.com>
Copy link
Collaborator

@psschwei psschwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Tansito Tansito self-requested a review August 2, 2023 14:23
Copy link
Member

@Tansito Tansito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it's fine for me! Sorry for the confusion 😂

@akihikokuroda akihikokuroda merged commit 270b3e7 into Qiskit:main Aug 2, 2023
@akihikokuroda akihikokuroda deleted the cleanup branch August 2, 2023 14:25
@akihikokuroda
Copy link
Collaborator Author

@Tansito NP. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add pre(or post) delete hook to helm chart
3 participants