snapd lost snaps

Bug #1908159 reported by Hadmut Danisch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Hi,

I recently tried Ubuntu MAAS as described somewhere on Canonical's website on an Lubuntu 20.04 system and installed the snaps maas maas-cli maas-test-db

Everything well, worked like expected, went through the "getting started" and successfully provisioned machines.

Now I wanted to remove it from the machine, since it occupies disk spaces and runs plenty of daemons.

Although the snaps are there and running, the snap command does not find them and is not able to uninstall:

# snap list
Name Version Rev Tracking Publisher Notes
aws-cli 1.15.58 130 latest/stable aws✓ classic
chromium 87.0.4280.88 1424 latest/stable canonical✓ -
core 16-2.48 10444 latest/stable canonical✓ core
core18 20200929 1932 latest/stable canonical✓ base
core20 20201027 875 latest/stable canonical✓ base
gnome-3-28-1804 3.28.0-19-g98f9e67.98f9e67 145 latest/stable canonical✓ -
gnome-3-34-1804 0+git.3556cb3 60 latest/stable canonical✓ -
go 1.15.6 6745 latest/stable mwhudson classic
gtk-common-themes 0.1-50-gf7627e4 1514 latest/stable canonical✓ -
helm 3.4.2 317 latest/stable snapcrafters classic
kotlin 1.4.20 54 latest/stable jetbrains✓ classic
kubectl 1.19.4 1679 latest/stable canonical✓ classic
lxd 4.8 18546 latest/stable canonical✓ -
signal-desktop 1.39.2 342 latest/stable snapcrafters -
snapd 2.48.1 10492 latest/stable canonical✓ snapd
telegram-desktop 2.4.7 2198 latest/stable telegram.desktop -
thunderbird 78.5.1 96 latest/stable canonical✓ -
unison-jz 2.51.2 19 latest/stable jz -
zoom-client 5.4.54779.1115 118 latest/stable ogra -

no maas listed.

# snap remove maas
snap "maas" is not installed

but /snap/maas /snap/maas-cli and /snap/maas-test-db exist, each having a current (maas: 8980, maas-cli: 13, maas-test-db: 34), and links in /snap/bin:

lrwxrwxrwx 1 root root 13 Dez 1 16:38 maas -> /usr/bin/snap*
lrwxrwxrwx 1 root root 13 Dez 1 16:37 maas-cli -> /usr/bin/snap*
lrwxrwxrwx 1 root root 13 Dez 1 16:42 maas-test-db.psql -> /usr/bin/snap*

the processes are started and running at reboot:

# ps -ef | fgrep maas
root 1309 1 0 00:59 ? 00:00:00 /bin/bash -e /snap/maas-test-db/34/bin/postgres.wrapper
root 1310 1 0 00:59 ? 00:00:01 python3 /snap/maas/8980/bin/supervisord -d /var/snap/maas/8980/supervisord -c /var/snap/maas/8980/supervisord/supervisord.conf -n
snap_da+ 1490 1309 0 00:59 ? 00:00:00 postgres -D /var/snap/maas-test-db/common/postgres/data -k /var/snap/maas-test-db/common/postgres/sockets -h
root 1798 1310 0 00:59 ? 00:00:00 /snap/maas/8980/usr/sbin/named -c /var/snap/maas/8980/bind/named.conf -g
root 1801 1310 1 00:59 ? 00:00:08 python3 /snap/maas/8980/sbin/rackd
root 1803 1310 1 00:59 ? 00:00:10 python3 /snap/maas/8980/sbin/regiond
root 1849 1801 0 00:59 ? 00:00:01 python3 /snap/maas/8980/bin/maas-rack observe-beacons wlp2s0
root 1850 1801 0 00:59 ? 00:00:01 python3 /snap/maas/8980/bin/maas-rack observe-beacons enp4s0
snap_da+ 1853 1490 0 00:59 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 1856 1490 0 00:59 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 1859 1490 0 00:59 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 1861 1490 0 00:59 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 1863 1490 0 00:59 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 1866 1490 0 00:59 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 1878 1490 0 00:59 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 1879 1490 0 00:59 ? 00:00:00 postgres: maas maasdb [local] idle
root 1880 1803 0 00:59 ? 00:00:05 python3 /snap/maas/8980/sbin/regiond
root 1881 1803 0 00:59 ? 00:00:05 python3 /snap/maas/8980/sbin/regiond
root 1882 1803 0 00:59 ? 00:00:06 python3 /snap/maas/8980/sbin/regiond
root 1884 1803 0 00:59 ? 00:00:05 python3 /snap/maas/8980/sbin/regiond
root 1896 1310 0 00:59 ? 00:00:00 /snap/maas/8980/usr/sbin/chronyd -u root -d -f /var/snap/maas/8980/etc/chrony/chrony.conf
root 1904 1310 0 00:59 ? 00:00:00 /snap/maas/8980/usr/sbin/rsyslogd -n -f /var/snap/maas/8980/syslog/rsyslog.conf -i /var/snap/maas/8980/syslog/rsyslog.pid
root 1922 1849 0 00:59 ? 00:00:00 /snap/maas/8980/usr/sbin/tcpdump --interface wlp2s0 --direction=in --no-promiscuous-mode --packet-buffered --immediate-mode --snapshot-length=16384 -n -w - (udp dst port 5240) or (vlan and udp dst port 5240)
root 1923 1310 0 00:59 ? 00:00:00 /bin/bash -e /snap/maas/8980/bin/run-squid
snap_da+ 1926 1923 0 00:59 ? 00:00:00 /snap/maas/8980/usr/sbin/squid -N -d 5 -f /var/snap/maas/8980/proxy/maas-proxy.conf
root 1927 1850 0 00:59 ? 00:00:00 /snap/maas/8980/usr/sbin/tcpdump --interface enp4s0 --direction=in --no-promiscuous-mode --packet-buffered --immediate-mode --snapshot-length=16384 -n -w - (udp dst port 5240) or (vlan and udp dst port 5240)
snap_da+ 1950 1490 0 01:00 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 1960 1490 0 01:00 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 1962 1490 0 01:00 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 1964 1490 0 01:00 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 1968 1490 0 01:00 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 1969 1490 0 01:00 ? 00:00:00 postgres: maas maasdb [local] idle
root 2008 1801 0 01:00 ? 00:00:00 python3 /snap/maas/8980/bin/maas-rack observe-arp wlp2s0
root 2009 1801 0 01:00 ? 00:00:01 python3 /snap/maas/8980/bin/maas-rack observe-arp enp4s0
root 2010 1801 0 01:00 ? 00:00:01 python3 /snap/maas/8980/bin/maas-rack observe-mdns
root 2019 2008 0 01:00 ? 00:00:00 /snap/maas/8980/usr/sbin/tcpdump --interface wlp2s0 --no-promiscuous-mode --packet-buffered --immediate-mode --snapshot-length=64 -n -w - arp or (vlan and arp)
root 2024 2010 0 01:00 ? 00:00:00 /snap/maas/8980/usr/bin/avahi-browse --all --resolve --no-db-lookup --parsable --no-fail
root 2025 2009 0 01:00 ? 00:00:00 /snap/maas/8980/usr/sbin/tcpdump --interface enp4s0 --no-promiscuous-mode --packet-buffered --immediate-mode --snapshot-length=64 -n -w - arp or (vlan and arp)
root 2105 1310 0 01:00 ? 00:00:00 nginx: master process /snap/maas/8980/usr/sbin/nginx -c /var/snap/maas/8980/http/nginx.conf
root 2150 1310 0 01:00 ? 00:00:00 /snap/maas/8980/usr/sbin/dhcpd -f -4 -pf /var/snap/maas/common/maas/dhcp/dhcpd.pid -cf /var/snap/maas/common/maas/dhcpd.conf -lf /var/snap/maas/common/maas/dhcp/dhcpd.leases enp4s0
root 2166 1310 0 01:00 ? 00:00:00 /snap/maas/8980/usr/sbin/dhcpd -f -6 -pf /var/snap/maas/common/maas/dhcp/dhcpd6.pid -cf /var/snap/maas/common/maas/dhcpd6.conf -lf /var/snap/maas/common/maas/dhcp/dhcpd6.leases enp4s0
snap_da+ 3406 1490 0 01:05 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 3819 1490 0 01:07 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 3889 1490 0 01:08 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 3922 1490 0 01:09 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 3938 1490 0 01:09 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 3962 1490 0 01:10 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 3997 1490 0 01:11 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 4024 1490 0 01:11 ? 00:00:00 postgres: maas maasdb [local] idle
snap_da+ 4055 1490 0 01:12 ? 00:00:00 postgres: maas maasdb [local] idle
root 4137 2554 0 01:14 pts/0 00:00:00 grep -F maas

even after reboot

# find /etc /lib/systemd /var -name snap-maas\*
/etc/systemd/system/multi-user.target.wants/snap-maas\x2dcli-13.mount
/etc/systemd/system/multi-user.target.wants/snap-maas\x2dtest\x2ddb-34.mount
/etc/systemd/system/multi-user.target.wants/snap-maas-8980.mount
/etc/systemd/system/snap-maas\x2dcli-13.mount
/etc/systemd/system/snap-maas\x2dtest\x2ddb-34.mount
/etc/systemd/system/snap-maas-8980.mount

Why can't snap list or remove those snaps anymore?

How do I remove the snaps without manually fiddling in the snap tree and possible damaging data structures or leaving files?

regards

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: snapd 2.48+20.04
ProcVersionSignature: Ubuntu 5.4.0-58.64-generic 5.4.73
Uname: Linux 5.4.0-58-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu27.13
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: LXQt
Date: Tue Dec 15 01:02:12 2020
InstallationDate: Installed on 2020-06-12 (185 days ago)
InstallationMedia: Lubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
SourcePackage: snapd
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.sudoers.d.99-snapd.conf: [inaccessible: [Errno 13] Permission denied: '/etc/sudoers.d/99-snapd.conf']

Revision history for this message
Hadmut Danisch (hadmut) wrote :
Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :

Do you still experience the problem? If so, can you collect the output of:

  snap list --all

I understand it has been a while since this had happened, but should this happen again, please collect the output of the journal (journalctl --no-pager preferrably).

Changed in snapd (Ubuntu):
status: New → Incomplete
Revision history for this message
Hadmut Danisch (hadmut) wrote :

Haven't seen it since reporting the issue.

I will follow your request as soon as it happens again.

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

[Expired for snapd (Ubuntu) because there has been no activity for 60 days.]

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