Wednesday 12 September 2018

Re: Transition of LXD from deb to snap

On Tue, Aug 21, 2018 at 04:39:46PM -0400, Stéphane Graber wrote:
> 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

All rdepends of lxd and lxd-client have been tested to behave properly
with the LXD snap and our deb shim.

I will now be uploading the transitional LXD deb to the archive, holding
it in -proposed until Monday so anyone interested can test it that way
and we can sort out any autopkgtest issue that may arise.

On Monday, I'll remove the blocker tag which should have it migrate to
the release pocket, I'll land a seed change at the same time, removing
lxd and lxd-client from the supported server seed and replacing lxd with
snap:lxd in the server ship seed.


This will then cause our images to start shipping the LXD snap rather
than the deb, we can then sort out any issue that show up as a result
of that change (should there be any).


Note that at this time, the LXD snap isn't using socket activation yet.
We have code in place for that in the edge channel but want to do more
tests on it before we roll it out to all our users. This means that
starting on Monday, LXD will be starting up unconditionally on 18.10
images. This is a temporary situation and will be corrected by release.

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