On a fresh machine apt-install snapd will bring you
admin@ip-172-31-49-221:~$ snap version
snap 2.21-2+b1
snapd 2.21-2+b1
series 16
debian 9
If you snap install microk8s --classic as the first snap you will get the following error:
admin@ip-172-31-49-221:~$ sudo snap install microk8s --classic
error: cannot perform the following tasks:
- Run configure hook of "microk8s" snap if present (run hook "configure":
-----
+ '[' '!' -d /var/snap/microk8s/238/certs ']'
+ grep -e '\-\-client-ca-file=${SNAP}/certs/ca.crt' /var/snap/microk8s/238/args/kube-apiserver
grep: /var/snap/microk8s/238/args/kube-apiserver: No such file or directory
+ grep requestheader-client-ca-file /var/snap/microk8s/238/args/kube-apiserver
grep: /var/snap/microk8s/238/args/kube-apiserver: No such file or directory
+ echo 'Patching requestheader-client-ca-file argument'
Patching requestheader-client-ca-file argument
+ echo ''
/snap/microk8s/238/meta/hooks/configure: line 29: /var/snap/microk8s/238/args/kube-apiserver: No such file or directory
If you then install core (also tested with lxd)
admin@ip-172-31-49-221:~$ sudo snap install core
core 16-2.35.5 from 'canonical' installed
Something gets initialized and you can install microk8s with no problems:
admin@ip-172-31-49-221:~$ snap changes
ID Status Spawn Ready Summary
1 Error today at 11:50 UTC today at 11:51 UTC Install "microk8s" snap
2 Done today at 11:50 UTC today at 11:50 UTC Initialize system state
3 Done today at 11:50 UTC today at 11:50 UTC Initialize device
4 Error today at 11:54 UTC today at 11:55 UTC Install "microk8s" snap
5 Done today at 11:55 UTC today at 11:55 UTC Install "core" snap
6 Done today at 11:55 UTC today at 11:55 UTC Install "microk8s" snap
i think the issue here is rather different (apart from the fact that snapd in debian is originally outdated in both threads) …
here the core snap does not get automatically installed along the first snap you try to install with sudo snap install ... the broken hook is just a subsequent issue …
so what you are saying is that one needs to be running ubuntu or installing snapd won’t work (particularly in this case Debian)?
no … in the specific case above manually running
sudo snap install core
right after installing snapd and before installing any other snap would have helped …
‘small smile’ - - - so to run snapd on Debian one installs snapd and then must use snapd to install a minimized ubuntu to run snapd on debian - - - - did I understand that correctly?
no, this is the same everywhere … the core snap ships libc and the basic execution environment for all snaps on all systems …
on some distros snapd re-execs itself into the binary shipped by the core snap which makes it independent from the distro update cadence.
Sorry your assertion is sophistry.
If a program (which is depicted as a complete system) runs on a system it requires no added software.
If a program requires additional software then that software needs ancillary software.
If snapd needs to install a further program before it can run on debian 9 - - - - well then it does NOT run independently as a complete system it is rather running as much complicated software does - - - WITH added software - - - ie it is NOT a complete system.
By your second statement it would seem that the change caused is that debian allows updates on a user determined schedule where snapd does not.
you are missing the point, normally snapd automatically installs the core snap along with the very first snap it installs, this bultin function has a bug for whatever reason.
regading your sophistry comment…
by design all snaps run in context of the core snap, there is nothing debian specific about this, this is the design of the snap ecosystem since day one and nobody claimed any different or that no core snap would be needed.
neither of what you said is in any way related to this topic or trying to help resolving the original issue, is it ?
@dabeegmon I’m not sure if you’re having the issue related to the topic, or if you’re wanting to discuss the mechanisms through which snaps work. If the former, we’ve acknowledged it’s a bug, and have (AIUI) explained a workaround until that bug gets addressed (it’s unclear to me whether the bug is in packaging of snapd or in snapd itself, but that’s immaterial at this point).
If the latter, if you’re wanting to discuss the mechanisms through which a snap gets to run, I’d strongly suggest you open a different topic.