Some standard updates break on classic, due to missing /etc/writable bind mount

Bug #1563223 reported by Alan Pope 🍺🐧🐱 🦄
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Confirmed
High
Unassigned

Bug Description

Install snappy on a raspberry pi, and enable classic mode with:-

sudo snappy enable-classic

Shell into the classic mode install and do updates:-

snappy shell classic

Now do your regular updates. When one for tzdata comes along (which happens relatively frequently), it breaks due to /etc/timezone being read-only (I think). This has the further effect of breaking snapcraft inside the classic shell when installing. As shown below.

(classic)ubuntu@localhost:~/qtox/snap$ snapcraft snap
Installing build dependencies: autopoint
[sudo] password for ubuntu:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  autopoint
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 406 kB of archives.
After this operation, 457 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports xenial/main armhf autopoint all 0.19.7-2ubuntu3 [406 kB]
Fetched 406 kB in 0s (1537 kB/s)
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
Selecting previously unselected package autopoint.
(Reading database ... 40965 files and directories currently installed.)
Preparing to unpack .../autopoint_0.19.7-2ubuntu3_all.deb ...
Unpacking autopoint (0.19.7-2ubuntu3) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up tzdata (2016b-0ubuntu1) ...
/var/lib/dpkg/info/tzdata.config: 379: /var/lib/dpkg/info/tzdata.config: cannot create /etc/timezone: Directory nonexistent
dpkg: error processing package tzdata (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of ubuntu-minimal:
 ubuntu-minimal depends on tzdata; however:
  Package tzdata is not configured yet.

dpkg: error processing package ubuntu-minimal (--configure):
 dependency problems - leaving unconfigured
Setting up autopoint (0.19.7-2ubuntu3) ...
Errors were encountered while processing:
 tzdata
 ubuntu-minimal

Revision history for this message
Alexander Sack (asac) wrote :

filed partly dupe (*also has sudo problem which is RO mounted) with maybe a bit more triaging info: https://bugs.launchpad.net/snappy/+bug/1564316

Revision history for this message
Oliver Grawert (ogra) wrote :

this is a different bug, not a duplicate.
the files /etc/timezone, /etc/localtime and /etc/hostname are links to files in /etc/writable/.
the classic shell does not bind mount /etc/writable to etc/writable/ inside the classic env, so the three files are dangling symlinks.

ubuntu@localhost:~$ sudo mkdir -p /writable/classic/etc/writable
ubuntu@localhost:~$ sudo mount --bind /etc/writable /writable/classic/etc/writable

will fix this issue.

summary: - Some standard updates break on classic, breaking snapcraft
+ Some standard updates break on classic, due to missing /etc/writable
+ bind mount
Changed in snappy:
status: New → Confirmed
Michael Vogt (mvo)
Changed in snappy:
importance: Undecided → Medium
importance: Medium → High
Michael Vogt (mvo)
affects: snappy → snapd
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.