Open zevin opened 7 years ago
I've got kitchen-lxd_cli running for my jenkins workers to run tests using kitchen test. The problem is that randomly containers are left sitting around, taking up disk space, crashing and making apport crazy, etc.
kitchen test
example: +--------------------------------+---------+-------------------+------+------------+-----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487243184 | RUNNING | 10.0.3.144 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487260892 | RUNNING | 10.0.3.89 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487261192 | RUNNING | 10.0.3.243 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487265388 | RUNNING | 10.0.3.162 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487270791 | RUNNING | 10.0.3.34 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487351543 | RUNNING | 10.0.3.196 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487351849 | RUNNING | 10.0.3.160 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+
+--------------------------------+---------+-------------------+------+------------+-----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487243184 | RUNNING | 10.0.3.144 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487260892 | RUNNING | 10.0.3.89 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487261192 | RUNNING | 10.0.3.243 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487265388 | RUNNING | 10.0.3.162 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487270791 | RUNNING | 10.0.3.34 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487351543 | RUNNING | 10.0.3.196 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487351849 | RUNNING | 10.0.3.160 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+
This is 1 day after going in and cleaning up old instances.
Is this a bug in the teardown step at the end of kitchen-test? Anyone know a fix?
Thanks!
I believe leftovers happen when tests failed. for my jenkins, I added a cleaning script https://github.com/juju4/ansible-jenkinsenv/blob/master/templates/lxc-cleaning.sh.j2
I've got kitchen-lxd_cli running for my jenkins workers to run tests using
kitchen test
. The problem is that randomly containers are left sitting around, taking up disk space, crashing and making apport crazy, etc.example:
+--------------------------------+---------+-------------------+------+------------+-----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487243184 | RUNNING | 10.0.3.144 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487260892 | RUNNING | 10.0.3.89 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487261192 | RUNNING | 10.0.3.243 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487265388 | RUNNING | 10.0.3.162 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487270791 | RUNNING | 10.0.3.34 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487351543 | RUNNING | 10.0.3.196 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+ | default-ubuntu-1404-1487351849 | RUNNING | 10.0.3.160 (eth0) | | PERSISTENT | 0 | +--------------------------------+---------+-------------------+------+------------+-----------+
This is 1 day after going in and cleaning up old instances.
Is this a bug in the teardown step at the end of kitchen-test? Anyone know a fix?
Thanks!