[lxc-devel] [lxd/master] container_lxc: ensure container is initialized

brauner on Github lxc-bot at linuxcontainers.org
Thu Jan 18 11:00:32 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 418 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180118/8e646d3d/attachment.bin>
-------------- next part --------------
From 107beb0369b672f184dfe1483dabbde57d9af2c5 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Thu, 18 Jan 2018 11:58:49 +0100
Subject: [PATCH] container_lxc: ensure container is initialized

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
Reported-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 lxd/container_lxc.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go
index f72a1aedc..d3844ed38 100644
--- a/lxd/container_lxc.go
+++ b/lxd/container_lxc.go
@@ -4884,6 +4884,10 @@ func (c *containerLXC) Migrate(args *CriuMigrationArgs) error {
 			}
 		}
 	} else if args.cmd == lxc.MIGRATE_FEATURE_CHECK {
+		err := c.initLXC(true)
+		if err != nil {
+			return err
+		}
 
 		opts := lxc.MigrateOptions{
 			FeaturesToCheck: args.features,


More information about the lxc-devel mailing list