I've just experimented locally with lxd itself and have deleted two
instances. While no processes/nics are left behind, the containers are
not purged:

$ lxc list --debug
2015/05/06 14:27:00 fingering the daemon
2015/05/06 14:27:00 raw response: 
{"type":"sync","status":"Success","status_code":200,"metadata":{"api_compat":1,"auth":"trusted","config":{"trust-password":false},"environment":{"backing_fs":"btrfs","driver":"lxc","kernel_version":"3.19.0-16-generic","lxc_version":"1.1.2"}}}
2015/05/06 14:27:00 pong received
2015/05/06 14:27:00 raw response: 
{"type":"sync","status":"Success","status_code":200,"metadata":[]}
+------+-------+------+------+-----------+
| NAME | STATE | IPV4 | IPV6 | EPHEMERAL |
+------+-------+------+------+-----------+
+------+-------+------+------+-----------+

$ lxc launch images:ubuntu/vivid/i386 ubuntu-32-2
Creating container...error: Container exists

$ ls /var/lib/lxd/lxc/                                                          
                                     
lxc-monitord.log  ubuntu-32  ubuntu-32-2

Not sure if it's the same for you, but for me it's likely a systemd/lxc/btrfs 
issue:
$ btrfs sub list .
[...]
ID 586 gen 303191 top level 560 path 
var/lib/lxd/lxc/ubuntu-32/rootfs/var/lib/machines
ID 587 gen 303187 top level 560 path 
var/lib/lxd/lxc/ubuntu-32-2/rootfs/var/lib/machines

Looks like the database isn't cleared either:

$ sqlite3 lxd.db .dump
INSERT INTO "containers_config" 
VALUES(1,1,'volatile.eth0.hwaddr','00:16:3e:c0:c9:ce');
INSERT INTO "containers_config" 
VALUES(2,2,'volatile.eth0.hwaddr','00:16:3e:ab:ac:24');
[...]
INSERT INTO "containers_profiles" VALUES(1,1,1,1);
INSERT INTO "containers_profiles" VALUES(2,2,1,1);

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1447127

Title:
  Terminated LXD instances processes stick around

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxd/+bug/1447127/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to