From: Christian Brauner Date: Fri, 14 May 2021 17:00:14 +0000 (+0200) Subject: start: move idmapped mount setup later X-Git-Tag: lxc-5.0.0~169^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4564b7ef97ffca0b37c743f63c7572bc73a0552;p=thirdparty%2Flxc.git start: move idmapped mount setup later At the prior location we we're placed between sending and receiving networking information over the data socket causing the startup to fail. Signed-off-by: Christian Brauner --- diff --git a/src/lxc/start.c b/src/lxc/start.c index a6e4e57d1..e3ed26d0a 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1786,12 +1786,6 @@ static int lxc_spawn(struct lxc_handler *handler) } } - ret = lxc_rootfs_prepare_parent(handler); - if (ret) { - ERROR("Failed to prepare rootfs"); - goto out_delete_net; - } - if (!lxc_sync_wake_child(handler, START_SYNC_STARTUP)) goto out_delete_net; @@ -1852,6 +1846,12 @@ static int lxc_spawn(struct lxc_handler *handler) } } + ret = lxc_rootfs_prepare_parent(handler); + if (ret) { + ERROR("Failed to prepare rootfs"); + goto out_delete_net; + } + if (!lxc_list_empty(&conf->procs)) { ret = setup_proc_filesystem(&conf->procs, handler->pid); if (ret < 0)