I am using a headless Ubuntu 16.04.3 on EC2, i have recently installed OSSEC HIDS and today (after updates and reboots of some servers) it started firing off emails for
snap-repair[4607]: error: cannot use snap-repair on a classic system
On all of those rebooted servers. The main updates where:
libcups2
update-notifier-common
lxd
lxd-client
2 servers had a snapd update (only one is firing alerts)
According to some other posts, this classic mode can happen if the system started with 16.04.1, but the most recent machine having errors in the syslog was built a couple weeks ago from scratch with 16.04.3.
Ultimately, b/c i don’t know a lot about snapd, but am interested in learning:
If no snaps are installed, should the daemon even be started, if so what requires it?
Do i need to update a package, so i don’t have this error snap-repair[4607]: error: cannot use snap-repair on a classic system, going into syslog and HIDS sending me emails about it throughout the day (yes i can stop them through HIDS config, but that is not my question).
All servers return the same responses:
$> sudo snap list
No snaps are installed yet. Try “snap install hello-world”.
$> sudo snap version
snap 2.27.5
snapd 2.27.5
series 16
ubuntu 16.04
kernel 4.4.0-1032-aws
There are also other notifications in the syslog, but they do not produce errors, ultimately my first question may be higher priority than the second, as i don’t want software running that i don’t currently need, but am happy to enable it when the need arises.
Thank you, very much for considering my noob question.
Jeff
Thanks @mvo, should i report this elsewhere so it gets tagged as a bug, or is this sufficient? If you need any more detailed information from me please feel free to ask, happy to give what i can.
You can stop/disable the “snap.snap-repair.timer” systemd unit as a workaround for now. This will stop the messages. We are working on a proper fix and it is ready for review in https://github.com/snapcore/snapd/pull/3897
for the time being, since i don’t make any use of snapd/snaps etc, i have
disabled everything, as i don’t reallly need something running on an
ec2.small instance that will consume any resources and is network related.
i use salt, so this was easily done in one command from the salt-master,
but in effect i did (also on 16.04, but as Oliver states it does not matter)
sudo systemctl stop snap-repair.timer
sudo systemctl disable snap-repair.timer // so it does not come back after
a reboot, which i assume it would, this kills the link
sudo systemctl stop snapd
sudo systemctl disable snapd
If you have need for snapd, don’t run the latter two commands.
you can check any of these services with sudo systemctl status {process}