[lxc-devel] [lxd/master] Allow unsetting deprecated keys with default
stgraber on Github
lxc-bot at linuxcontainers.org
Thu Mar 16 07:00:43 UTC 2017
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/20170316/6820198a/attachment.bin>
-------------- next part --------------
From ea00dec1e7158ec396ffd5a4dbfd9b68abd077bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 16 Mar 2017 06:59:11 +0000
Subject: [PATCH] Allow unsetting deprecated keys with default
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Closes #3073
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
lxd/daemon_config.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lxd/daemon_config.go b/lxd/daemon_config.go
index a6b5779..a8a487c 100644
--- a/lxd/daemon_config.go
+++ b/lxd/daemon_config.go
@@ -313,7 +313,7 @@ func daemonConfigValidateCompression(d *Daemon, key string, value string) error
}
func storageDeprecatedKeys(d *Daemon, key string, value string) error {
- if value == "" {
+ if value == "" || daemonConfig[key].defaultValue == value {
return nil
}
More information about the lxc-devel
mailing list