[lxc-devel] [go-lxc/v2] c/r: make sure container is running before doing a dump
tych0 on Github
lxc-bot at linuxcontainers.org
Thu Nov 3 17:25:59 UTC 2016
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 362 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20161103/ffbc72ee/attachment.bin>
-------------- next part --------------
From 0800e17ae9b3ada734eba5ba009d2123dcd06d37 Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho.andersen at canonical.com>
Date: Thu, 3 Nov 2016 17:24:08 +0000
Subject: [PATCH] c/r: make sure container is running before doing a dump
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
container.go | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/container.go b/container.go
index d44315a..e794252 100644
--- a/container.go
+++ b/container.go
@@ -1556,6 +1556,13 @@ func (c *Container) Migrate(cmd uint, opts MigrateOptions) error {
return err
}
+ if (cmd != MIGRATE_RESTORE) {
+ if err := c.makeSure(isRunning); err != nil {
+ return err
+ }
+ }
+
+
cdirectory := C.CString(opts.Directory)
defer C.free(unsafe.Pointer(cdirectory))
More information about the lxc-devel
mailing list