I am trying to connect the socket-directory content interface between two snaps inside of a lxd container and having some issues with the snapped process not starting following the connecting of the the content interface. I have a feeling I need to set some lxd profile config, but not exactly sure what. I found this, but lxc no longer accepts this config. Can someone help me understand what I need to do to my profile in order to get the bind mount content interface socket-directory to work correctly inside of a lxd/lxc container?
Not sure how I missed this - @stgraber thanks for the quick response!
I’m not getting any error from snapd as far as I can tell.
I am seeing these lines in syslog:
Feb 22 16:08:08 juju-ac70f6-15 systemd[1]: snap.munge.munged.service: Failed to reset devices.list: Operation not permitted
Feb 22 16:08:30 juju-ac70f6-15 systemd[1]: snap.slurmdbd.slurmdbd.service: Failed to reset devices.list: Operation not permitted
The devices.list are safe to ignore, they’re just systemd warnings.
The apparmor messages only show profiles being reloaded, again, that seems fine.
You could try to set security.nesting=true on the LXD container. This allows a bunch more type of mounts that normal, so that may help here.
If that still doesn’t work, it may be worth approaching the snapd team. They do some tests for snapd inside LXD, though I’m not sure how much testing is in place for the content interface.