The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/3596

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
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.ste...@alliedtelesis.co.nz>
From abd953eb5120b8a5fd4c97634ba01305ec6e1f3b Mon Sep 17 00:00:00 2001
From: Blair Steven <blair.ste...@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.ste...@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);
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to