[lxc-devel] [lxd/master] lxc/action: Fix pause

stgraber on Github lxc-bot at linuxcontainers.org
Wed May 9 20:27:00 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180509/8a25f967/attachment.bin>
-------------- next part --------------
From 8363227430ad440f7a43359294c4f44eae33082b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 9 May 2018 10:48:33 -0400
Subject: [PATCH] lxc/action: Fix pause
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxc/action.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lxc/action.go b/lxc/action.go
index 965361286..fd16c82d2 100644
--- a/lxc/action.go
+++ b/lxc/action.go
@@ -127,6 +127,11 @@ func (c *cmdAction) Command(action string) *cobra.Command {
 func (c *cmdAction) doAction(action string, conf *config.Config, nameArg string) error {
 	state := false
 
+	// Pause is called freeze
+	if action == "pause" {
+		action = "freeze"
+	}
+
 	// Only store state if asked to
 	if action == "stop" && c.flagStateful {
 		state = true


More information about the lxc-devel mailing list