Stop snap from auto update the lxd?

Hi,

my in house server was running very well with the old lxd, 3.x, lately it got updated to 3.18 by snap, is there a way to stop snap from auto updating? thanks

snap list
Name Version Rev Tracking Publisher Notes
core 16-2.42.1 8039 stable canonical✓ core
lxd 3.18 12317 stable canonical✓ -

Snapd has a specific update mechanism, and does not allow to fully disable updates. You can postpone updates or get them applied at a specific time of day. As a design mechanism, this ensures that no installed snap packages remain behind. There is a paying product for a snapd proxy that lets you have full control.

Run snap info lxd. It shows all the channels for LXD. You can switch to an alternative channel like 3.0/stable that gets updates veeery infrequently. That’s the 5-year support channel, to 2023.

You mention you had the 3.0 snap that autoupdated to 3.18. That should not happen. Something else happened.

revision 10343, I believe it’s LXD 3.11, now upgraded to 12317 which is LXD 3.18, so not really from 3.0, is might be just a minor upgrade? thanks.

Did you get snapd to delay the update of LXD for several months? snapd should have been trying to update daily to the new version. There should be a log in snapd showing the update log.

It’s a in house production server, never connect to the Interne after setup, and it runs very well. It got connected to the Internet for less than a hour to apt-get install some packages in a newly created lxd container, and few days later I noticed some issues, and found out lxd is already 3.18. where could I find the snapd update logs?

snap changes:
error: no changes found

btw, server is disconnected already from Internet.

here is some info I got from snap:

name: core
summary: snapd runtime environment
publisher: Canonical✓
contact: snaps@canonical.com
license: unset
description: |
The core runtime environment for snapd
type: core
snap-id: 99T7MUlRhtI3U0QFgl5mXXESAiSwt776
tracking: stable
refresh-date: 6 days ago, at 16:01 PST
installed: 16-2.42.1 (8039) 93MB core

name: lxd
summary: System container manager and API
publisher: Canonical✓
contact: https://github.com/lxc/lxd/issues
license: unset

snap-id: J60k4JY0HppjwOjW8dZdYc8obXKxujRu
tracking: stable
refresh-date: 5 days ago, at 10:40 PST
installed: 3.18 (12317) 57MB -

I connected the server twice, compare above,

1st time 6 days ago:

Snapd runtime got updated

2nd time 5 days ago:

lxd got updated from 3.11 to 3.18

so maybe those Shutdown problem after upgrading to lxd 3.18 was due to :

lxd 3.11 was running in a new snapd runtime environment (16-2.42.1)

and seems go away after upgraded to 3.18

?

Okay, it makes sense now. You kept the old version of the snap package of LXD by keeping the server offline. While it works, you would have needed to use apt-proxy (get apt to work through a proxy) and leave the host without direct access with the internet.

You would need to embrace updates, or get the host offline&proxy only.

Thanks for the help, it’s a production server, can not afford to be stopped, and I don’t want to snap revert back to 3.11, so just run the 3.18, and set snap proxy to 127.0.0.1:1111 for now to avoid any unexpected issues.