docker plugin fails to delete a container resource in CREATE_FAILED state

Bug #1364017 reported by Lars Kellogg-Stedman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
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:

  docker_dbserver:
    type: "DockerInc::Docker::Container"
    properties:
      image: mysql
      port_specs:
        - 3306
      port_bindings:
        3306: 3306
      env:
        - 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
Revision history for this message
Lars Kellogg-Stedman (larsks) wrote :
Changed in heat:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

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

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.