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

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) ===
Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 4314e84dc5f5d94f7843d6d29ab711c3f6755281 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Mon, 20 Apr 2020 14:20:55 -0400
Subject: [PATCH] lxd/instance/lxc: Don't crash in setNetworkPriority
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd/instance/drivers/driver_lxc.go | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lxd/instance/drivers/driver_lxc.go 
b/lxd/instance/drivers/driver_lxc.go
index 38e7265942..9dfa2d9dc3 100644
--- a/lxd/instance/drivers/driver_lxc.go
+++ b/lxd/instance/drivers/driver_lxc.go
@@ -6369,6 +6369,13 @@ func (c *lxc) removeDiskDevices() error {
 
 // Network I/O limits
 func (c *lxc) setNetworkPriority() error {
+       // Load the go-lxc struct.
+       err := c.initLXC(false)
+       if err != nil {
+               return err
+       }
+
+       // Load the cgroup struct.
        cg, err := c.cgroup(nil)
        if err != nil {
                return err
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to