Fixes in the deletion path of the container#337
Merged
Conversation
✅ Deploy Preview for urunc canceled.
|
ec85f24 to
8a25043
Compare
ananos
approved these changes
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>
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>
2b99c1b to
7e24094
Compare
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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 ofstate.jsonfile not found which we were indeed deleting incorrectly. At last, it refactors a bit the killing of the monitor process, by utilizing the respectiveStopmethod of the monitors interface.