removing snapd fails on zfsroot install

Bug #1887600 reported by Tessa
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

when installed with a zfs root on Ubuntu 20.04, the installer creates a filesystem for /var/snap. however, the postrm script of the snapd tries to remove that directory, and it can't, because it's a mounted filesystem. the script should do the correct thing (destroy the filesystem and remove the dir) on zfs root installs.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: snapd (not installed)
ProcVersionSignature: Ubuntu 5.4.0-40.44-generic 5.4.44
Uname: Linux 5.4.0-40-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu27.3
Architecture: amd64
CasperMD5CheckResult: skip
Date: Tue Jul 14 20:24:07 2020
InstallationDate: Installed on 2020-07-15 (0 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
ProcEnviron:
 LANGUAGE=en_CA:en
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
SourcePackage: snapd
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Tessa (unit3) wrote :
Revision history for this message
Tessa (unit3) wrote :

```
root@boxxy:~# apt remove --purge snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libllvm9
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
  snapd*
0 upgraded, 0 newly installed, 1 to remove and 6 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Requesting to save current system state
Successfully saved as "autozsys_dqsrt5"
(Reading database ... 165648 files and directories currently installed.)
Purging configuration files for snapd (2.45.1+20.04) ...
Final directory cleanup
rm: cannot remove '/var/snap': Device or resource busy
dpkg: error processing package snapd (--purge):
 installed snapd package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
 snapd
```

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
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.