Hello, I accidentally removed snapd when removing appArmor. When snapd was installed again, I can install nothing via snap:
$ sudo snap install snap-store
snap "snap-store" is already installed, see 'snap help refresh'
$ sudo snap list
error: cannot list local snaps! cannot find publisher details: snap-declaration (PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4; series:16) not found
$ sudo snap refresh snap-store
error: too early for operation, device not yet seeded or device model not acknowledged
июн 22 22:41:12 e15 snapd[6948]: hotplug.go:131: internal error: cannot get global device context: too early for operation, device model not yet acknowledged
июн 22 22:41:12 e15 snapd[6948]: snapmgr.go:296: cannot read snap info of snap "core" at revision 9289: cannot find installed snap "core" at revision 9289: missing file /snap/core/9289/meta/snap.yaml
Well I’m glad it’s working but it would still be helpful to us and any potential future users that run into this problem if you could post the full log so we can debug what the cause of the problem might have been for you.
And face the exact same device not yet seeded error message as the OP.
Deployment is being done with Terraform/Ansible so I’m trying to install Snaps within minutes of the system coming up for the first time.
Reproducing the state of a system like this is difficult since it’s quite time-sensitive but when I added in an extra reboot step the problem disappeared:
Can you provide snap list output from one of these machines? Perhaps there is a snap in the seed on the 20.04 images on AWS that is slowing down how long it takes to seed. Also your problem seems to be different, if I understand you correctly, eventually if you waited long enough the problem goes away and you can use/install snaps, but the OP had the issue that they were never able to use/install snaps no matter how long they waited
I will try to get you a clean snap list and snap changes tomorrow on a freshly-deployed image, but it’s worth noting that I only installed the docker snap here manually:
And yes, looking a bit closer, you are right and my issue might be a bit different to OP’s and sounds more like the one @popey was facing in this thread. If I wait a while (or add a reboot before the snap install stage) I am able to install Snaps.
perhaps this discussion is better served on the other thread, but after you have the system booted, you should almost always do snap wait system seed.loaded before any snap command. This will ensure that the system is done setting up any seeded snaps. After that wait command is done, the output of this snippet would be helpful:
for chg in $(snap changes | awk '{print $1}' | grep -Po '[0-9]+'); do
echo ">>> $chg <<<"
snap debug timings $chg
done