Skip to content

feature: clean up removed game server nodes from the server settings - #648

Closed
Flegma wants to merge 1 commit into
mainfrom
feature/node-removal-cleanup
Closed

Flegma wants to merge 1 commit into
mainfrom
feature/node-removal-cleanup

Conversation

@Flegma

@Flegma Flegma commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Problem

Removing a game server node only deletes its row. The Kubernetes objects the api created for it stay behind: its update, gamedata validation and streamer Jobs, volume claims, volume records and its Node entry. 5stackgg/api#471 cleans them up automatically when a node is removed, but admins need a way to run that cleanup themselves: when the automatic run could not finish, and for nodes removed before that change.

With that change, the one-click Remove Node menu item also starts the cleanup, so it should ask first.

Fix

  • Clean Up in a new Danger Zone under Settings > Application > Servers. It follows the pattern of the danger zone in the player settings.
    • The button asks first in an AlertDialog. It sits outside the settings form, so it never submits the form.
    • It calls the new cleanupRemovedNodes action and shows the result in a toast: what was removed, whether node entries were kept because the api has no permission to delete nodes, removed nodes that were skipped because Kubernetes reported them as Ready in the last 10 minutes, and how many objects failed. The title says there was nothing to clean up only when nothing was removed, kept or skipped.
    • It shows a spinner and stays disabled while the cleanup runs.
  • Remove Node asks first. In both the desktop and the mobile menu of a node, it now opens an AlertDialog that names the node and says what happens: once Kubernetes has reported the node as not ready for 10 minutes, its update, streamer and gamedata validation jobs, volume claims, volume records and node entry are deleted from Kubernetes too. Files on its disk are kept. A node that is still running adds itself back within a minute, but disabled and with its settings reset, so the dialog says to remove it again once it is down. The automatic cleanup stops checking about 20 minutes after the removal, so for a node that does not come back but is still Ready 10 minutes after the removal, the dialog points to Clean Up Removed Nodes once Kubernetes has reported it as not ready for 10 minutes.
  • New strings are in all 17 locales.

Scope / notes

Adds a Danger Zone to Settings > Application > Servers that runs the new
cleanupRemovedNodes action and reports what it removed, skipped or
could not delete.

Remove Node now asks first, since removing a node also starts the
cleanup of what it left in Kubernetes.
@lukepolo

lukepolo commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Closing: 5stackgg/api#485 cleans up removed nodes automatically, so the manual cleanup button isn't needed.

@lukepolo lukepolo closed this Oct 2, 2026
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