Public bug reported:

Description:    Ubuntu 16.04.6 LTS
Release:        16.04

snapd version: 2.40 from the xenial-updates repo

After running `apt-get remove snapd`, some services like apparmor and
snappy-installed services fail to start up in systemd. apparmor fails
because the /etc/apparmor.d/usr.lib.snapd.snap-confine.real profile,
which does not get removed, tries to include /var/lib/snapd/apparmor
/snap-confine, which does get removed. I expect to find no failed
services after removing snap (assuming there weren't any to begin with).

As far as the snappy-installed services, looking at the snap.amazon-ssm-
agent.amazon-ssm-agent.service unit, it calls `/usr/bin/snap run amazon-
ssm-agent` in its ExecStart, which fails since /usr/bin/snap is gone.

Admittedly I'm not very familiar with packaging, but it seems to me like
the ideal case would be to not leave any service failures lingering
after uninstalling the package. For the former case, that would require
removing the apparmor profile. For the latter, that means removing all
snaps before removing the snap package. Are these reasonable goals? My
instinct tells me if someone is removing snapd then they won't be using
snaps at all.

I am aware that the apparmor issue can be resolved by running `apt-get
purge snapd`, but I believe the remove command should still avoid
leaving services broken, especially since abstracted package handlers
like ansible's package module may not use the purge command.

** Affects: snapd (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: packaging

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1864125

Title:
  certain services fail to start after removing snapd

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1864125/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to