Ubuntu-image: snapd not compatible with a kernel containing snapd prior

Hi,

I have noticed today that my model assertions on both amd64 and arm64 (raspberry pi) fail to build an image using ubuntu-image. They both get the same error:

Error: Error preparing image: snapd 2.68+ is not compatible with a kernel containing snapd prior to 2.68

They both track stable channels for snapd and their respective kernels, pc-kernel 25.04/stable on amd64 and pi-kernel 24/stable on arm64. I can get past the issue on amd64 using the candidate channel, which has a newer build, but I would rather not have it track candidate by default in production. For arm64 I have not been able to get past this issue.

I cannot see that any of the involved snaps have had any updates to their stable channels in the last few days, so I am unsure what the issue is? I was able to build these last week just fine.

Hi,

You can override this behavior by using the --allow-snapd-kernel-mismatch flag in ubuntu-image. Note though that this requires ubuntu-image 3.8.0, that is currently in the candidate channel.

Works great, thank you!