We’re having trouble using the 1.8.x
snap on Ubuntu Core 16 for raspberry pi (I had no trouble on plain Ubuntu 20 on aws ec2).
After installation (sudo snap install --channel=1.8.x aws-iot-greengrass
), attempting to set the certs will fail (because the daemon tries to start immediately). Attempting to start the daemon fails.
We get snappy-debug messages such as these:
= AppArmor =
Time: Jan 8 01:04:13
Log: apparmor="DENIED" operation="open" profile="/usr/lib/snapd/snap-confine" name="/sys/fs/cgroup/devices/snap.aws-iot-greengrass.greengrassd/" pid=4722 comm="snap-confine" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
File: /sys/fs/cgroup/devices/snap.aws-iot-greengrass.greengrassd/ (read)
Suggestion:
* adjust program to not access '/sys/fs/cgroup/devices/snap.aws-iot-greengrass.greengrassd/'
The filepath /sys/fs/cgroup/devices/snap.aws-iot-greengrass.greengrassd/
shows up repeatedly, which is strange given that owner /old_rootfs/sys/fs/cgroup/{,**} r, would catch it.
In case the /old_rootfs
prefix was preventing a match, we added a line in the AppArmor profile exactly for that line:
owner /sys/fs/cgroup/devices/snap.aws-iot-greengrass.greengrassd r,
We used apparmor_parser
to reload it, but we still got the error message.
We didn’t find the Greengrass logs under $SNAP_DATA/ggc-writable
even though populating that directory is one of the first things Greengrass does on startup. That and the fact that we couldn’t run --shell
into the snap indicates that there’s something fundamentally broken with the way permissions are granted.
Admittedly, the 1.8.x
channel no longer receives new snaps, but its latest snap is supposed to have basic functionality.