No LXD images after rebooting zfs server

I have a server running LXD. I’ve noticed that its images are lost whenever it’s rebooted (an infrequent event so I’ve just been working around the problem).

I’m using ZFS storage and everything seems to be working except this one thing which makes me wonder if it’s a setting that I have missed. Containers are not lost and come back as expected when the server boots… it’s only the images I have a problem with (i.e. lxc image ls returns nothing until I push an image to the server).

$ lxc version
Client version: 4.12
Server version: 4.12

Any chance you can get onto 4.17? It’s always quite hard for us to figure out what fixes may or may not in an old unsupported release.

I’ll see if I can do that, yes. I last updated in April so isn’t that old. The box is critical so I’ll need to plan it, but yes if I can I will.

99.999% sure this is BAU so I’m marking it as solved.

Images are cleaned up 10 days or so after last use. This is a server, images are used to create containers and then never used for a long time, so they get deleted. I just noticed it after a server reboot, that’s all.

I was using the image store as a poor man’s image registry but I’ll work out something else. I have them in CI anyway.

You can change or even disable the 10 days thing.

images.remote_cache_expiry set to 0 should do it.