Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leftover containers? #19

Open
zevin opened this issue Feb 17, 2017 · 1 comment
Open

Leftover containers? #19

zevin opened this issue Feb 17, 2017 · 1 comment

Comments

@zevin
Copy link

zevin commented Feb 17, 2017

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!

@juju4
Copy link

juju4 commented Feb 23, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants