[lxc-devel] [lxd/master] Project: Adds features.networks to default project on fresh DB create

tomponline on Github lxc-bot at linuxcontainers.org
Tue Sep 22 15:59:30 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 301 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200922/74c8109a/attachment.bin>
-------------- next part --------------
From 2f303a439a951f5486045cf8fddfd890d2ebce33 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Tue, 22 Sep 2020 15:40:48 +0100
Subject: [PATCH 1/2] lxd/project/permissions: Typo

Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
 lxd/project/permissions.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/project/permissions.go b/lxd/project/permissions.go
index ce14278fc9..e635490b05 100644
--- a/lxd/project/permissions.go
+++ b/lxd/project/permissions.go
@@ -297,7 +297,7 @@ func checkRestrictions(project *api.Project, instances []db.Instance, profiles [
 	allowVMLowLevel := false
 
 	for _, key := range AllRestrictions {
-		// Check if this particularl restriction is defined explicitly
+		// Check if this particular restriction is defined explicitly
 		// in the project config. If not, use the default value.
 		restrictionValue, ok := project.Config[key]
 		if !ok {

From df1a8dd966d4908066442d2d097c102556f1c42f Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Tue, 22 Sep 2020 16:55:28 +0100
Subject: [PATCH 2/2] lxd/db/cluster/open: Adds features.networks to default
 project on new database

Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
 lxd/db/cluster/open.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lxd/db/cluster/open.go b/lxd/db/cluster/open.go
index 23b4f9b662..d888e15dfe 100644
--- a/lxd/db/cluster/open.go
+++ b/lxd/db/cluster/open.go
@@ -185,6 +185,7 @@ INSERT INTO projects (name, description) VALUES ('default', 'Default LXD project
 INSERT INTO projects_config (project_id, key, value) VALUES (1, 'features.images', 'true');
 INSERT INTO projects_config (project_id, key, value) VALUES (1, 'features.profiles', 'true');
 INSERT INTO projects_config (project_id, key, value) VALUES (1, 'features.storage.volumes', 'true');
+INSERT INTO projects_config (project_id, key, value) VALUES (1, 'features.networks', 'true');
 `
 			_, err = tx.Exec(stmt)
 			if err != nil {


More information about the lxc-devel mailing list