Skip to content

Solve issue #42 (AIOpsLab) #3

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ChuanweiQu
Copy link
Collaborator

Change the setting of hotel-reservation application to use "standard" storageClass to provision PVs dynamically. In this way, when PVCs are deleted, PVs will be cleaned up automatically.

Change the setting of hotel-reservation application to use "standard" storageClass to provision PVs dynamically. In this way, when PVCs are deleted, PVs will be cleaned up automatically.
@ChuanweiQu
Copy link
Collaborator Author

ChuanweiQu commented Apr 14, 2025

@HacksonClark Hi, Jackson. I have already changed the pvc setting for hotel-reservation and this works well. Do you need to review my changes?

@yinfangchen
Copy link
Member

Good catch @ChuanweiQu! However, I think this may break a fault that relies on this behavior - redeploy_without_PV-
Basically, every time the PVC is deleted, the PV will persist there; and next time when you re-deploy the application, there will be errors happening. This is how the fault happens for this scenario.

@HacksonClark
Copy link
Collaborator

@yinfangchen That's true, maybe we need a more creative solution.

@ChuanweiQu
Copy link
Collaborator Author

Okay. I will try to find another solution and see if it works.

@ChuanweiQu
Copy link
Collaborator Author

I've been thinking about this carefully. The source of exceptions that we can not control should only be the the call of agent (such as network issues or authority issues.) If exceptions happen in other parts of our code, that means we have bugs and we should fix the bugs to prevent exceptions instead of thinking about exit cleanly. So, the only situation we care about is when the exception happen during call of agent. In this way, it won't be hard to apply try catch statement.

@HacksonClark
Copy link
Collaborator

@ChuanweiQu That makes sense to me. There's only so much we can do about a user running Ctrl+C.

@ChuanweiQu
Copy link
Collaborator Author

ChuanweiQu commented Apr 16, 2025

@HacksonClark No, we can still use atexit to deal with the situation of ctrl+c. I'm just saying if users try to catch some exceptions and not exit, the function registered with atexit will not work. However, If we catch the expcetions first in our code, this will not be a problem. And as I mentioned above, the only source of exceptions should be the call of agents.

@HacksonClark
Copy link
Collaborator

@ChuanweiQu I see. This seems like a good approach.

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.

3 participants