zabbly / incus

Incus package repository
176 stars 14 forks source link

Deletion of snapshots with ':' fails #39

Closed janmuennich closed 3 months ago

janmuennich commented 3 months ago

After migrating from LXD 5.0.3 to Incus 6.0, we adjusted our backup scripts for Incus, where snapshots can't deleted anymore. Apparently the colon in snapshot names is wrongly detected as a delimiter:

Command help:

Usage:
  incus snapshot delete [<remote>:]<instance> <snapshot name> [flags]

Works:

# incus snapshot create container 2024-04-16_15:52:44_hourly

Fails:

# incus snapshot delete container 2024-04-16_15:52:44_hourly
Error: The remote "2024-04-16_15" doesn't exist

I guess this is a bug. Even if : is detected as a delimiter between remote and instance, this doesn't really make sense. What would the argument container be detected as then?

What I tried:

stgraber commented 3 months ago

That's a small Incus bug, I just sent a fix for it now: https://github.com/lxc/incus/pull/757

In the mean time, you may be able to perform the deletion through incus query -X DELETE /1.0/instances/container/snapshots/2024-04-16_15:52:44_hourly if you need the snapshot gone now.

stgraber commented 3 months ago

Closing as no further action is needed on this repository (Incus packaging), the fix will be handled on the Incus side and will be backported to the stable release.