Skip to content

Prevent deleting proxy containers on restart #1083

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

Merged
merged 2 commits into from
Jul 17, 2025

Conversation

eleftherias
Copy link
Member

Fix #1080

When ToolHive restarts a workload it checks if the container already exists and can be reused. If it cannot be reused, it deletes it and creates a new container.

This happens for every container in the workload, including egress and dns containers that are created when network isolation is enabled.

The code previously recreated the egress and dns containers, and then proceeded to remove them when recreating the core MCP server container, because it was removing all associated workloads.
With this update, it only deletes the container that it's about to recreate and leaves the associated containers, assuming they've already updated themselves.

This is a similar issue to what we saw earlier with the network being deleted.

@eleftherias eleftherias requested a review from dmjb July 16, 2025 15:16
@eleftherias eleftherias merged commit 633ea75 into main Jul 17, 2025
30 of 31 checks passed
@eleftherias eleftherias deleted the fix-network-container-restart branch July 17, 2025 13:35
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.

thv restart doesn't start egress and dns containers
2 participants