docker plugin fails to delete a container resource in CREATE_FAILED state

Bug #1364017 reported by Lars Kellogg-Stedman on 2014-09-01
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Lars Kellogg-Stedman

Bug Description

The docker plugin (plugin from master, running in stable/icehouse) is unable to delete failed container. Given the following resource:

    type: "DockerInc::Docker::Container"
      image: mysql
        - 3306
        3306: 3306
        - MYSQL_ROOT_PASSWORD=secret
      name: dbserver

If a container named "dbserver" already exists, the create fails with:

  409 Client Error: Conflict ("Conflict, The name dbserver is already assigned to ff7791c42f29. You have to delete (or rename) that container to be able to assign dbserver to a container again.")

This puts the container into a CREATE_FAILED state:

  $ heat resource-list local
  | resource_name | resource_type | resource_status | updated_time |
  | docker_dbserver | DockerInc::Docker::Container | CREATE_FAILED | 2014-09-01T13:49:58Z |

Trying to delete this stack will result in a new error:

APIError: 404 Client Error: Not Found ("No such container: None")

At this point, the only option is "heat stack-abandon".

Changed in heat:
assignee: nobody → Lars Kellogg-Stedman (larsks)
status: New → In Progress
Changed in heat:
importance: Undecided → Medium

Change abandoned by Lars Kellogg-Stedman (<email address hidden>) on branch: master
Reason: Jeff has an existing patch that is largely identical.

LiangChen (hs-chen) wrote :

I'm sorry I make a mistaken change it to Released.

Changed in heat:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers