How to specific the kernel snap on core18

On the new and upcoming Ubuntu Core 18 systems we will use the 4.15 version of the linux kernel. This raise the question how we specific this in the model assertion. Right now (in Ubuntu Core 16) we have e.g.:

kernel: pi2-kernel

in the model assertion for the pi2.

The core-pi2-18.model assertion will need to contain something to specify that we want a different version. I can see some options:

  1. kernel: pi2-kernel
    kernel-track: 4.15
  2. kernel: pi2-kernel/4.15 # specify track inline
  3. kernel: pi2-kernel-4.15 # totally different snap name for ver 4.15
  4. kernel: pi2-kernel
    kernel-channel: 4.15/stable
  5. kernel: pi2-kernel/4.15/stable # specify channel inline

Feedback welcome!

i find the separate “kernel-channel:” (option 1) most clear and understandable as a porter.

We don’t have a conclusion yet, but here are some notes from the conversation we just had in the standup:

  • We have settings in seed.yaml that allow changing channels already, and might leverage it
  • That said, being able to run ubuntu-image core-amd64-18.model and get the proper image out is quite nice
  • If we hardcode the track in the model, we should still allow freedom of risks and branches, so people can experiment with different revisions
  • The prior point means we don’t want to hardcode channels in the model… perhaps the track though
  • If we do specify something in the model, it should really be respected, otherwise we cannot claim that the given image is for the given model anymore

Thanks, I updated the proposal above.

Option 1 looks the cleanest. Option 2 feels like an unusual spelling of a channel, where the track usually precedes the risk but in this case is succeeding a snap name.

Seems reasonable to have that. We just need to watch out for the points above: once we allow tracks to be specified, they need to be respected. Otherwise we’ll open a gap and will be locked out into a backward compatibility issue.

When will this “kernel-track” option be available? I am the pc-kernel snap, but need the Linux kernel version 4.15 for my hardware.

After some further deliberations we decided to use the following form to specify the kernel-track. So instead of the explicit kernel-track: track we now do:

kernel: snap=track

The advantage of this is that we can (later) allow this for gadgets and other snaps as well. This is implemented in https://github.com/snapcore/snapd/pull/5563