The container has plenty of snapshots:

# lxc-snapshot -L -n td-backupslave | wc -l
53

Is stopped:

# lxc-ls -f|grep td-backupslave
td-backupslave                STOPPED 0         -      -         -


But not able to remove it:

# lxc-destroy -n td-backupslave -s
lxc-destroy: lxccontainer.c: do_lxcapi_destroy: 2417 Container td-backupslave has snapshots; not removing
Destroying td-backupslave failed

# lxc-destroy -s -n td-backupslave
lxc-destroy: lxccontainer.c: do_lxcapi_destroy: 2417 Container td-backupslave has snapshots; not removing
Destroying td-backupslave failed


According to help, "-s" option should destroy a container even if it has snapshots:

# lxc-destroy -h
Usage: lxc-destroy --name=NAME [-f] [-P lxcpath]

lxc-destroy destroys a container with the identifier NAME

Options :
  -n, --name=NAME   NAME of the container
  -s, --snapshots   destroy including all snapshots
  -f, --force       wait for the container to shut down
  --rcfile=FILE     Load configuration file FILE



Am I misreading the help, or is it a bug?

It's Ubuntu 16.04 with these lxc packages:

# dpkg -l|grep lxc
ii liblxc1 2.0.5-0ubuntu1~ubuntu16.04.2 amd64 Linux Containers userspace tools (library) ii lxc 2.0.5-0ubuntu1~ubuntu16.04.2 all Transitional package for lxc1 ii lxc-common 2.0.5-0ubuntu1~ubuntu16.04.2 amd64 Linux Containers userspace tools (common tools) ii lxc-templates 2.0.5-0ubuntu1~ubuntu16.04.2 amd64 Linux Containers userspace tools (templates) ii lxc1 2.0.5-0ubuntu1~ubuntu16.04.2 amd64 Linux Containers userspace tools ii lxcfs 2.0.4-0ubuntu1~ubuntu16.04.1 amd64 FUSE based filesystem for LXC ii python3-lxc 2.0.5-0ubuntu1~ubuntu16.04.2 amd64 Linux Containers userspace tools (Python 3.x bindings)


Tomasz Chmielewski
https://lxadm.com
_______________________________________________
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to