[jbossts-issues] [JBoss JIRA] (JBTM-3019) Testsuite: Docker controller leaves stray volumes and fills up disk space unnecessairly over time

Michal Karm Babacek (JIRA) issues at jboss.org
Thu May 3 02:45:00 EDT 2018


Michal Karm Babacek created JBTM-3019:
-----------------------------------------

             Summary: Testsuite: Docker controller leaves stray volumes and fills up disk space unnecessairly over time
                 Key: JBTM-3019
                 URL: https://issues.jboss.org/browse/JBTM-3019
             Project: JBoss Transaction Manager
          Issue Type: Bug
          Components: Testing
    Affects Versions: 5.8.1.Final
         Environment: Docker enabled Jenkins slaves
            Reporter: Michal Karm Babacek
            Assignee: Michal Karm Babacek
            Priority: Minor
             Fix For: 5.next


h3. Problem
The Docker controller that allocates databases as Docker containers cleans up containers and does not leave unnecessary images:
{code}
[root at karm-centos7-x86-64 ~]# docker images
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
docker.io/postgres   9.4                 26bd9b04b948        6 days ago          232 MB
docker.io/postgres   10                  0965cdc98045        6 days ago          234 MB
docker.io/postgres   <none>              ed5db6e669ff        7 weeks ago         263 MB
docker.io/postgres   <none>              30121e967865        7 weeks ago         289 MB
[root at karm-centos7-x86-64 ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root at karm-centos7-x86-64 ~]# 
{code}
Although it leaves stray container volumes for some reason:
{code}
[root at karm-centos7-x86-64 ~]# du -hs /var/lib/docker-latest/volumes
15G	/var/lib/docker-latest/volumes
[root at karm-centos7-x86-64 ~]# docker volume ls -qf dangling=true | wc -l
409
{code}
It unnecessarily clogs the slaves' disk space. The 15G of garbage has been created over dozens and dozens of builds with at least two containers each, but it shouldn't be happening anyway.

h3. Call to action
Review whether [removeContainerCmd|https://github.com/jbosstm/narayana/blob/master/tools/src/main/java/io/narayana/db/PostgreContainerAllocator.java#L264] is supposed to be enough to not only remove the container but to also remove its volume.

h3. Workaround
{code}
docker volume prune
{code}



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jbossts-issues mailing list