Docker plugin does not actually remove containers.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
Low
|
Lars Kellogg-Stedman |
Bug Description
When deleting a docker container, it looks as if the Docker plugin *stops* the container but does not *remove*. Given the following resource:
docker_dbserver:
type: "DockerInc:
properties:
image: mysql
port_specs:
- 3306
port_
3306: 3306
env:
- MYSQL_ROOT_
name: dbserver
volumes:
If we successfully create the stack, we end up with:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ce51887391f7 mysql:5 "/entrypoint.sh mysq 54 seconds ago Up 53 seconds 0.0.0.0:
If we delete the stack, Heat logs a successful deletion:
[req-46e8154b-
[-] deleting DockerContainer "docker_dbserver" [ce51887391f744
But `docker ps -a` shows that the container still exists:
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ce51887391f7 mysql:5 "/entrypoint.sh mysq About a minute ago Exited (-1) 41 seconds ago dbserver
This means that if one tries to re-create the stack, Heat will fail
with:
APIError: 409 Client Error: Conflict ("Conflict, The name dbserver is already assigned to ce51887391f7. You have to delete (or rename) that container to be able to assign dbserver to a container again.")
Changed in heat: | |
importance: | Undecided → Medium |
Changed in heat: | |
status: | In Progress → Triaged |
importance: | Medium → Low |
Changed in heat: | |
status: | Triaged → In Progress |
Changed in heat: | |
milestone: | none → mitaka-3 |
...and that point, you hit https:/ /bugs.launchpad .net/heat/ +bug/1364017