classic mode (v1)

Martin Pitt martin.pitt at ubuntu.com
Tue Nov 24 13:58:27 UTC 2015


Hello,

I actually promised myself to not point this out for the umpteenth
time, but it seems the conversation on the gdoc stopped.

Michael Vogt [2015-11-23 17:48 +0100]:
> We implement the classic mode as a writable overlay.

I *strongly* recommend to not do this. We have dozens of bug reports
of packages misbehaving on overlayfs; a particularly nasty case are
packages that fail to upgrade/install on overlayfs, which is an use
case which is relevant in the classic env (but not on a live system).

It also degrades performance, causes stat() to misbehave (as the
overlaying is leaked left and right into userspace, so e. g.
"mountpoint" fails), and after a few rounds of dist-upgrades you still
have the original old file system which is then just wasting disk
space.

All this for saving a few seconds of time for the initial setup seems
like an unacceptable trade-off to me..

> It seems like we have the following options:
> 
> 1) Once ubuntu-classic is installed the snap can never be updated, but
>    the *content* of the snap can be updated, i.e. you can keep your
>    classic environment up-to-date via "sudo apt full-upgrade" (or we
>    could even do it automatically via unattended-upgrades).

See above, dist-upgrading is not reliable, and it's rather fiddly to
fix the chroot after such a failure happened; this rules out
unattended-upgrades.

> 2) All system level changes (like additionally installed packages in
>    ubuntu-classic) are lost on each snap update.

How would that be? As soon as you e. g. upgrade a deb, it's in the
overlay, and if you change the same file in the underlay, that change
will be ignored. But with overlayfs you actually must not change the
underlay, as that breaks the overlay too: the inodes change, and even
for cases where they don't you would still see new files from the
upgraded package version in the underlay which the package version in
the overlay dropped.

> 3) All system level changes are not persistent and you get a fresh
>    overlay each time snappy shell ubuntu-classic is run.

That's a practical option -- it avoids having to dist-upgrade manually
(and if you try and it screws up, there's not much damage), having to
copy/unpack the original fs/tarball to the hard disk into the chroot,
and you can still bind-mount home and /run dirs.  This is much like
developers use schroot today, for building  packages in a clean
environment.

So this is essentially a question whether you want a schroot-like
experience or a real classic Ubuntu-like experience where you can
install your favourite editor, debuggers, tools, etc. without having
to reinstall and reconfigure it from scratch every time you use it.

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20151124/490fc5f4/attachment.pgp>


More information about the snappy-devel mailing list