lxc snapshot allows a ':' in snapshot name
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Package info:
lxd 2.0.0-0ubuntu4 amd64 Container hypervisor based on LXC - daemon
on 16.04 LTS
When you create a snapshot of a container with command
lxc snapshot [remote:]<source> <snapshot name> [--stateful]
The command allows you to use a ':' in the snapshot name, once the snapshot is created it
can no longer be manipulated because all the other command treat the : as a remote reference.
lxc snapshot www nuc2:wwwsnap0
Snapshots:
snap0 (taken at 2016/05/23 22:18 UTC) (stateless)
nuc2:wwwsnap0 (taken at 2016/05/24 02:30 UTC) (stateless)
lxc delete www/nuc2:wwwspan0
error: unknown remote name: "www/nuc2"
The only way I could delete it that I found was to update the row in the container table of
/var/lib/lxd/lxd.db and change the name to a valid one. This was the result trying to create a snapshot on a remote.
Changed in lxd (Ubuntu): | |
status: | New → Invalid |
stgraber@ castiana: ~$ lxc snapshot test a:b castiana: ~$ lxc restore test a:b castiana: ~$ lxc delete local:test/a:b
stgraber@
stgraber@
So this all works as expected. If the name may be confused for a remote, then the remote name becomes mandatory. This is typically "local:" (can be checked with lxc remote list) and when properly prefixed with it, everything works.