lxc snapshot allows a ':' in snapshot name

Bug #1585017 reported by Ron Knapp
6
This bug affects 1 person
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.

Revision history for this message
Stéphane Graber (stgraber) wrote :

stgraber@castiana:~$ lxc snapshot test a:b
stgraber@castiana:~$ lxc restore test a:b
stgraber@castiana:~$ lxc delete local:test/a:b

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.

Changed in lxd (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.