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

DM-41188: Rework state management for file servers #208

Merged
merged 1 commit into from
Nov 1, 2023
Merged

Conversation

rra
Copy link
Member

@rra rra commented Nov 1, 2023

Use the same pattern as the new state management in LabManager: a dictionary of state objects per user, where the user is never removed once we've seen them. In this case, the state object only needs to hold a lock, not a full-blown manager class.

Rather than spawning a separate background task (and Kubernetes watch) for every running file server, use a single background task that watches for all pod changes in the namespace. Use that to catch pod phase changes. Add a background reconcile task to look for any other problems (such as Kubernetes object deletion) and clean up after those.

Add Slack reporting of errors in file server operations.

@rra rra requested a review from athornton November 1, 2023 19:45
@rra rra force-pushed the tickets/DM-41188 branch from 87fd2fc to 175cf1e Compare November 1, 2023 19:46
Copy link
Member

@athornton athornton left a comment

Choose a reason for hiding this comment

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

Looks fine. Couple of minor comment-wording things.

Use the same pattern as the new state management in LabManager:
a dictionary of state objects per user, where the user is never
removed once we've seen them. In this case, the state object only
needs to hold a lock, not a full-blown manager class.

Rather than spawning a separate background task (and Kubernetes
watch) for every running file server, use a single background task
that watches for all pod changes in the namespace. Use that to
catch pod phase changes. Add a background reconcile task to look
for any other problems (such as Kubernetes object deletion) and
clean up after those.

Add Slack reporting of errors in file server operations.
@rra rra force-pushed the tickets/DM-41188 branch from 175cf1e to 9acda5b Compare November 1, 2023 20:31
@rra rra enabled auto-merge November 1, 2023 20:31
@rra rra merged commit f9a9743 into main Nov 1, 2023
5 checks passed
@rra rra deleted the tickets/DM-41188 branch November 1, 2023 20:34
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.

2 participants