Skip to content

Fixes in the deletion path of the container#337

Merged
urunc-bot[bot] merged 3 commits into
mainfrom
fix_delete
Nov 25, 2025
Merged

Fixes in the deletion path of the container#337
urunc-bot[bot] merged 3 commits into
mainfrom
fix_delete

Conversation

@cmainas

@cmainas cmainas commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

This PR performs various small fixes in the container deletion path of urunc. The most important, of which is that it makes sure we enter the correct network namespace of the container before cleaning up the network. Moreover, it resolves the annoying logs of state.json file not found which we were indeed deleting incorrectly. At last, it refactors a bit the killing of the monitor process, by utilizing the respective Stop method of the monitors interface.

@netlify

netlify Bot commented Nov 14, 2025

Copy link
Copy Markdown

Deploy Preview for urunc canceled.

Name Link
🔨 Latest commit 7e24094
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/6925862a4ee70d0008b8aab5

@cmainas cmainas force-pushed the fix_delete branch 2 times, most recently from ec85f24 to 8a25043 Compare November 17, 2025 15:09
@cmainas cmainas marked this pull request as ready for review November 17, 2025 15:20
@cmainas cmainas requested a review from ananos November 17, 2025 15:21
@cmainas cmainas linked an issue Nov 17, 2025 that may be closed by this pull request

@ananos ananos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks @cmainas, LGTM

When a new container is created the container's config instructs us on
joining or creating anew namespace. Using the same information, we need
to enter the correct network namespace and rmeove the tap device that we
previously created.

THis commit properly handles the above scenario and joins the correct
namespace before killing the monitor process and cleaning up urunc's
created tap devices.

PR: #337
Signed-off-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
Move the code that actually kills the monitor process in the Stop method
of monitors to make it cleaner.

PR: #337
Signed-off-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
Refactor the cod eof thr Delete function in unikontainers to simplify
the process of rmeoving the directories that urunc has created.
Furthermore, remove the path to the monitor binary in the new
container's rootfs, covering also the case that the binary is not placed
under one of the removed directories.

PR: #337
Signed-off-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
@urunc-bot urunc-bot Bot merged commit 67bcc35 into main Nov 25, 2025
5 of 7 checks passed
urunc-bot Bot pushed a commit that referenced this pull request Nov 25, 2025
When a new container is created the container's config instructs us on
joining or creating anew namespace. Using the same information, we need
to enter the correct network namespace and rmeove the tap device that we
previously created.

THis commit properly handles the above scenario and joins the correct
namespace before killing the monitor process and cleaning up urunc's
created tap devices.

PR: #337
Signed-off-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
urunc-bot Bot pushed a commit that referenced this pull request Nov 25, 2025
Move the code that actually kills the monitor process in the Stop method
of monitors to make it cleaner.

PR: #337
Signed-off-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
@sonarqubecloud

Copy link
Copy Markdown

@cmainas cmainas deleted the fix_delete branch December 5, 2025 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix force deleting containers

2 participants