Skip to content

AppArmor denials to cpu.max and sudo #715

@nobuto-m

Description

@nobuto-m

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    APPARMOR DenialsbugSomething isn't workingquestionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions