On Fri, Jun 07, 2024 at 06:31:03PM +0200, Matthieu Baerts (NGI0) wrote:
Instead of only appending items to the list, removing them when the netns has been deleted.
By doing that, we can make sure 'cleanup_all_ns()' is not trying to remove already deleted netns.
Reviewed-by: Geliang Tang geliang@kernel.org Signed-off-by: Matthieu Baerts (NGI0) matttbe@kernel.org
Hi Matthieu,
I like this, and I am happy to see that it has been accepted.
I do wonder if we can go a step further and use an associative array for ns_list (maybe renamed). I think this would reduce remove_ns_list to something like:
unset ns_list["$item"]
OTOH, perhaps this breaks with older versions of bash that we still care about.
...