In a Sunbeam deployment, microceph triggers the highest number of AppArmor denials out of many components.
# journalctl -k | grep 'apparmor="DENIED" .*profile="snap.microceph' | awk '{print $12}' | sort | uniq -c
336 profile="snap.microceph.microceph"
8 profile="snap.microceph.mon"
8 profile="snap.microceph.osd"
Each part of the snap tries to access the following path, and it's rejected by AppArmor. Those should be reviewed and allowed if it's expected access or rejected explicitly and suppress the output.
[snap.microceph.microceph]
/var/lib/snapd/hostfs/run/cilium/cgroupv2/system.slice/snap.microceph.microceph-*.scope/cpu.max
[snap.microceph.mon / snap.microceph.osd]
/usr/bin/sudo
From my past experience, some functions in Ceph relies on sudo to invoke an external binary such as smartctl/nvme. e.g. https://bugs.launchpad.net/charm-ceph-osd/+bug/2031637
In a Sunbeam deployment, microceph triggers the highest number of AppArmor denials out of many components.
Each part of the snap tries to access the following path, and it's rejected by AppArmor. Those should be reviewed and allowed if it's expected access or rejected explicitly and suppress the output.
[snap.microceph.microceph]
/var/lib/snapd/hostfs/run/cilium/cgroupv2/system.slice/snap.microceph.microceph-*.scope/cpu.max[snap.microceph.mon / snap.microceph.osd]
/usr/bin/sudoFrom my past experience, some functions in Ceph relies on sudo to invoke an external binary such as
smartctl/nvme. e.g. https://bugs.launchpad.net/charm-ceph-osd/+bug/2031637