Error using obsolete ubuntu-core snap on classic

We became aware of an issue where recent snapd doesn’t function very well if used in the old-named ubuntu-core snap instead of the new-named core snap. We need to address this before the release of 2.25 and 2.26.

This seems to be caused by hard-coding core as the name of the snap we look at looking for snap-confine and other execute-from-core assets.

There are a few obvious places where this is a factor (re-exec checks, usage of snap-confine, detection of the apparmor profile) but there may be others. We should spend the better part of tomorrow focusing on this issue.

CC @mvo @fgimenez @JamieBennett @niemeyer

This is too vague. Can we have someone that really understand the ins and outs of this issue detailing what’s broken and how/when did it break?

The issue is simple, we started hard-coding the-name-of-the-snap-shipping-snapd as core. In the past we preferred core but also had a fallback to ubuntu-core. We no longer have that. The when it broke part is less clear but I plan to find out (tomorrow)

EDIT: I added this fact to the initial post

The problem is that ubuntu-core is very much a second class citizen by now.

We only need a somewhat recent version so that we have a snapd in ubuntu-core that will auto-transition the existing ubuntu-core to the proper core snap. However to do this we don’t actually need to release ubuntu-core regularly (and keep all the compatibility baggage in snapd). The population of ubuntu-core users is very small and you only get it by default if you start with ubuntu 16.04.1 (snapd 2.0.10) which is obsolete by now and probably has more problems).

Therefore I would suggest we do the following:

  1. freeze the ubuntu-core snap in all channels
  2. stop auto-building the ubuntu-core snap
  3. disallow installing ubuntu-core from snapd (i.e. snap install ubuntu-core should fail)
  4. add a spread-cron (or similar) test that ensures that when we have the latest ubuntu-core it will correctly transition to the latest snapd
3 Likes

Great plan, Michael!

the daily cron job has been turned off …

1 Like

the spread-cron branches are in place, snapd-ubuntu-core-amd64-* in https://travis-ci.org/snapcore/spread-cron/branches, the test executed is https://github.com/fgimenez/validator/blob/master/tests/tasks/validate-ubuntu-core-snap/task.yaml

1 Like