[lxc-devel] [lxd/master] lxc/copy: Don't strip volatile keys on refresh
stgraber on Github
lxc-bot at linuxcontainers.org
Mon Apr 29 18:39:27 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 370 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190429/f5c43749/attachment-0001.bin>
-------------- next part --------------
From 65c7815a6328d46cc3da4d7a4fc76df0501d957b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Mon, 29 Apr 2019 14:37:58 -0400
Subject: [PATCH] lxc/copy: Don't strip volatile keys on refresh
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Closes #5708
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
lxc/copy.go | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lxc/copy.go b/lxc/copy.go
index 05e00564a7..9e08d9897b 100644
--- a/lxc/copy.go
+++ b/lxc/copy.go
@@ -430,14 +430,15 @@ func (c *cmdCopy) Run(cmd *cobra.Command, args []string) error {
}
stateful := !c.flagStateless && !c.flagRefresh
+ keepVolatile := c.flagRefresh
// If not target name is specified, one will be chosed by the server
if len(args) < 2 {
- return c.copyContainer(conf, args[0], "", false, ephem,
+ return c.copyContainer(conf, args[0], "", keepVolatile, ephem,
stateful, c.flagContainerOnly, mode, c.flagStorage)
}
// Normal copy with a pre-determined name
- return c.copyContainer(conf, args[0], args[1], false, ephem,
+ return c.copyContainer(conf, args[0], args[1], keepVolatile, ephem,
stateful, c.flagContainerOnly, mode, c.flagStorage)
}
More information about the lxc-devel
mailing list