I’ve been working with the upstream OpenShell devs on some improvements to the openshell snap. We’ve identified an issue where the docker plug is not auto-connected if the docker snap happens to be already installed when the openshell snap is installed: https://github.com/NVIDIA/OpenShell/pull/2869#discussion_r3964575409
The openshell snap already has the following snap-declaration assertion:
plugs:
docker:
allow-auto-connection: true
home:
allow-auto-connection: true
kvm:
allow-auto-connection: true
log-observe:
allow-auto-connection: true
personal-files:
allow-auto-connection: true
allow-installation:
plug-attributes:
read: \$HOME/\.kube/config
plug-names:
- kube-config
system-observe:
allow-auto-connection: true
This means that the openshell:docker is eligible to autoconnect to any docker slot which is present. However, the docker interface has implicitOnClassic: true, which means that there’s always a system :docker slot present. The docker snap also provides its own docker:docker-daemon slot. Thus, if the docker snap happens to be installed, there are two docker slots eligible for auto-connection, so snapd auto-connects neither, leaving it up to the user to decide which to connect.
This presents an inconsistent user experience for people trying to use the openshell snap. What we want is for the openshell:docker plug to always auto-connect to the system :docker slot. Connecting to this slot means that openshell has access to whatever Docker daemon happens to be present –- importantly, that Docker daemon could be provided by the docker snap, but it could also be a traditional Docker installation. By auto-connecting to the :docker slot always, the openshell snap will always work consistently with Docker, regardless of the latter’s installation method.
To do this, we request the following change to the openshell snap’s snap-declaration assertion:
plugs:
docker:
allow-auto-connection: true
should become
plugs:
docker:
allow-auto-connection:
slot-snap-type:
- core
Please let me know if you have any questions or you need additional information from me.
Thank you!