[lxc-devel] [lxd/master] Fix apparmor policy to allow snap ceph config access

stgraber on Github lxc-bot at linuxcontainers.org
Thu Dec 10 18:01:37 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/20201210/c64103b1/attachment.bin>
-------------- next part --------------
From acc09a9f09b307f4b02c4b0f43a8b24d32214575 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 9 Dec 2020 17:58:07 -0500
Subject: [PATCH 1/2] doc/networks: Add missing escaping
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>
---
 doc/networks.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/networks.md b/doc/networks.md
index 55082dcc82..ccdc9c417d 100644
--- a/doc/networks.md
+++ b/doc/networks.md
@@ -330,4 +330,4 @@ ipv6.ovn.ranges                 | string    | -                     | -
 ipv6.routes                     | string    | ipv6 address          | -                         | Comma separated list of additional IPv6 CIDR subnets that can be used with child OVN networks ipv6.routes.external setting
 ipv6.routes.anycast             | boolean   | ipv6 address          | false                     | Allow the overlapping routes to be used on multiple networks/NIC at the same time.
 dns.nameservers                 | string    | standard mode         | -                         | List of DNS server IPs on physical network
-ovn.ingress_mode                | string    | standard mode         | l2proxy                   | Sets the method that OVN NIC external IPs will be advertised on uplink network. Either `l2proxy` (proxy ARP/NDP) or `routed`.
+ovn.ingress\_mode               | string    | standard mode         | l2proxy                   | Sets the method that OVN NIC external IPs will be advertised on uplink network. Either `l2proxy` (proxy ARP/NDP) or `routed`.

From 6f3169e5d6aec32baa80955e1ea1f38bdced4cc7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 10 Dec 2020 13:00:49 -0500
Subject: [PATCH 2/2] lxd/apparmor/qemu: Allow ceph snap paths
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>
---
 lxd/apparmor/instance_qemu.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lxd/apparmor/instance_qemu.go b/lxd/apparmor/instance_qemu.go
index 4f7e7104f0..deb3075960 100644
--- a/lxd/apparmor/instance_qemu.go
+++ b/lxd/apparmor/instance_qemu.go
@@ -69,6 +69,10 @@ profile "{{ .name }}" flags=(attach_disconnected,mediate_deleted) {
   /snap/lxd/*/bin/qemu*                     mrix,
   /snap/lxd/*/share/qemu/**                 kr,
 
+  # Snap-specific paths
+  /var/snap/lxd/common/ceph/**              r,
+  {{ .rootPath }}/etc/ceph/**               r,
+
   # Snap-specific libraries
   /snap/lxd/*/lib/**.so*            mr,
 {{- end }}


More information about the lxc-devel mailing list