Tuesday 21 August 2018

Re: Transition of LXD from deb to snap

On Tue, Aug 21, 2018 at 03:35:11PM -0400, Stéphane Graber wrote:
> On Tue, Aug 21, 2018 at 12:25:33PM -0700, Steve Langasek wrote:
> > On Tue, Aug 21, 2018 at 03:03:48PM -0400, Stéphane Graber wrote:
> > > > > A branch of the stable channel of those tracks will be created and
> > > > > closed per policy on seeded snaps (allowing to push emergency snaps to
> > > > > those users bypassing the upstream).
> >
> > > > Excellent!
> >
> > > I actually had a question about that part, the wiki says to create an
> > > ubuntu-18.10 branch and use that during snap installation.
> >
> > > But then what's responsible for switching this to a ubuntu-19.04 branch
> > > during the next upgrade?
> >
> > Support for this has landed in ubuntu-release-upgrader 1:18.10.8 in cosmic;
> > LP: #1748581. Note that this is based on a whitelist of known seeded snaps
> > that are encoded in u-r-u as part of the quirks handling (which is not ideal
> > since it duplicates the package seeds), so this will need to be updated to
> > include the lxd snap here.
>
> Hmm, interesting, though it looks like the logic in the upgrader here is
> a bit lacking and may lead to data corruption or at least broken snaps.
>
> It appears to just run "snap refresh <name>
> --channel=stable/ubuntu-18.10" which means a potential track switch and
> channel switch for users that have seen decided to switch to another
> channel or track.
>
>
> Commented in the bug, I suspect this bug needs to be re-open and the
> logic revisited.
>
> https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1748581
>
> > > Since the same version of the snap will be pushed to all Ubuntu series,
> > > wouldn't it make more sense to have it just be "ubuntu", saving us the
> > > trouble of having to figure out what to do on Ubuntu release upgrades
> > > and reflecting the fact that the snap is the same for all series.
> >
> > This escape hatch exists precisely for the case that the upstream stable
> > snap does not integrate correctly in a release-agnostic fashion and
> > per-Ubuntu-release quirking is needed. Better to have it and never use it
> > than to need it and not have it.
>
> Yeah, if we fix the upgrader to handle the above properly
> (and as suggested in the LP bug), then that should be fine.


I've now updated the PPA with version ~ppa5.

This includes:
- Using the ubuntu-XX.XX branches (created and closed)
- Debconf prompts are now high except for the unreachable store one
which is critical
- Added logic to select the "3.0" track for LTS releaes
- Added noninteractive logic to print a message a 0, 10 and 20 minutes,
trying connection every minute and giving up after 30.
- Stop & disable the old systemd services to avoid any conflicts

I've validated all combinations of those variables:
- series: 18.04 and 18.10
- debconf: interactive (curses), interactive (text) and noninteractive
- connectivity: available, unavailable, available after a few minutes


--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com