LXD 3.17 deleted my manual snapshots

After the LXD snap refreshed to 3.17 I noticed my manual snapshots were gone. I found this in the logs:

t=2019-09-09T07:19:56-0400 lvl=info msg="Pruning expired container snapshots" 
t=2019-09-09T07:19:56-0400 lvl=info msg="Deleting container" created=2019-09-07T08:09:13-0400 ephemeral=false name=bionic/snap0 project=default used=0001-01-01T00:00:00+0000
t=2019-09-09T07:19:56-0400 lvl=info msg="Done pruning expired container snapshots" 
t=2019-09-09T07:19:57-0400 lvl=info msg="Deleted container" created=2019-09-07T08:09:13-0400 ephemeral=false name=bionic/snap0 project=default used=0001-01-01T00:00:00+0000
t=2019-09-09T07:19:57-0400 lvl=info msg="Deleting container" created=2019-09-07T08:16:41-0400 ephemeral=false name=bionic/snap1 project=default used=0001-01-01T00:00:00+0000
t=2019-09-09T07:19:57-0400 lvl=info msg="Deleted container" created=2019-09-07T08:16:41-0400 ephemeral=false name=bionic/snap1 project=default used=0001-01-01T00:00:00+0000
t=2019-09-09T07:19:57-0400 lvl=info msg="Deleting container" created=2019-09-07T08:09:45-0400 ephemeral=false name=disco/snap0 project=default used=0001-01-01T00:00:00+0000
t=2019-09-09T07:19:57-0400 lvl=info msg="Deleted container" created=2019-09-07T08:09:45-0400 ephemeral=false name=disco/snap0 project=default used=0001-01-01T00:00:00+0000
t=2019-09-09T07:19:57-0400 lvl=info msg="Deleting container" created=2019-09-07T08:16:45-0400 ephemeral=false name=disco/snap1 project=default used=0001-01-01T00:00:00+0000
t=2019-09-09T07:19:57-0400 lvl=info msg="Deleted container" created=2019-09-07T08:16:45-0400 ephemeral=false name=disco/snap1 project=default used=0001-01-01T00:00:00+0000

Hmm, just did a whole bunch of testing on containers with a mix of expiring and non-expiring snapshots combined with a 3.16 to 3.17 upgrade and haven’t been able to reproduce it.

Could you maybe send me a tarball of /var/snap/lxd/common/lxd/database? With a bit of luck your global.bak contains enough of your pre-upgrade state for me to reproduce the issue.

If you don’t mind, send it to stgraber at ubuntu dot com

Sent, thanks.

Well received, thanks. Will need to set a bit of time aside to setup a system where I can load this with sufficiently convincing fake snapshots on disk to properly cause the expiry code to trigger.