[lxc-devel] [lxc/master] Restore interfaces to the correct namespace on error
blairsteven on Github
lxc-bot at linuxcontainers.org
Tue Dec 8 23:16:28 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 491 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201208/a25e3b43/attachment.bin>
-------------- next part --------------
From abd953eb5120b8a5fd4c97634ba01305ec6e1f3b Mon Sep 17 00:00:00 2001
From: Blair Steven <blair.steven at alliedtelesis.co.nz>
Date: Wed, 9 Dec 2020 11:23:39 +1300
Subject: [PATCH] Restore interfaces to the correct namespace on error
If the container unexpectedly exists we may need to restore physical
interfaces back into the main namespace in a tidy way.
Signed-off-by: Blair Steven <blair.steven at alliedtelesis.co.nz>
---
src/lxc/start.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lxc/start.c b/src/lxc/start.c
index 7bf7f8a2fb..863ae123b3 100644
--- a/src/lxc/start.c
+++ b/src/lxc/start.c
@@ -2144,6 +2144,7 @@ int __lxc_start(struct lxc_handler *handler, struct lxc_operations *ops,
out_delete_network:
lxc_abort(handler);
+ lxc_restore_phys_nics_to_netns(handler);
lxc_delete_network(handler);
detach_block_device(handler->conf);
lxc_end(handler);
More information about the lxc-devel
mailing list