The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/1755
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) === When some containers are stopped and devlxd is accessed through an interactive LXD exec shell, the code fails to find what container the request came from. To fix that, just make sure we skip stopped containers. This may be the source of #1751 Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From b623f504c683521dac6f57a636c108e57693e339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Mon, 14 Mar 2016 23:17:22 -0400 Subject: [PATCH] Fix devlxd failing to detect container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When some containers are stopped and devlxd is accessed through an interactive LXD exec shell, the code fails to find what container the request came from. To fix that, just make sure we skip stopped containers. This may be the source of #1751 Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/devlxd.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lxd/devlxd.go b/lxd/devlxd.go index 7fd9fff..ecb28e8 100644 --- a/lxd/devlxd.go +++ b/lxd/devlxd.go @@ -338,6 +338,10 @@ func findContainerForPid(pid int32, d *Daemon) (container, error) { return nil, err } + if !c.IsRunning() { + continue + } + initpid := c.InitPID() pidNs, err := os.Readlink(fmt.Sprintf("/proc/%d/ns/pid", initpid)) if err != nil {
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel