From c0b48eff1731a20dec8cb3f57acd08aca90c15dc Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Fri, 25 May 2018 00:25:16 +0200 Subject: [PATCH] start: log setns() failure Signed-off-by: Christian Brauner --- src/lxc/start.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lxc/start.c b/src/lxc/start.c index ba737d239..638e195d6 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -1486,8 +1486,16 @@ static inline int do_share_ns(void *arg) continue; ret = setns(handler->nsfd[i], 0); - if (ret < 0) + if (ret < 0) { + /* + * Note that joining a user and/or mount namespace + * requires the process is not multithreaded otherwise + * setns() will fail here. + */ + SYSERROR("Failed to inherit %s namespace", + ns_info[i].proc_name); return -1; + } DEBUG("Inherited %s namespace", ns_info[i].proc_name); } -- 2.47.2