The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/8160
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) === Don't attempt to call the function if we don't have the runtime extension. Closes #8159 Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 8358159f533e3a83b0c72ce3e18757370df281d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Sat, 14 Nov 2020 22:43:29 -0500 Subject: [PATCH] lxd/instance/lxc: Add extra check for devpts_fd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't attempt to call the function if we don't have the runtime extension. Closes #8159 Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/instance/drivers/driver_lxc.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lxd/instance/drivers/driver_lxc.go b/lxd/instance/drivers/driver_lxc.go index 6e59fcfe72..83f1170d81 100644 --- a/lxd/instance/drivers/driver_lxc.go +++ b/lxd/instance/drivers/driver_lxc.go @@ -6631,6 +6631,10 @@ func (c *lxc) DevptsFd() (*os.File, error) { return nil, err } + if !liblxc.HasApiExtension("devpts_fd") { + return nil, fmt.Errorf("Missing devpts_fd extension") + } + return c.c.DevptsFd() }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel