container-list fails after container-create fail with 500

Bug #1472132 reported by Eli Qiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Eli Qiao

Bug Description

here is the reproduce steps
http://paste.openstack.org/show/351079/

beside, container_list shouldn't query those container which status is "Error"

Eli Qiao (taget-9)
Changed in magnum:
assignee: nobody → Eli Qiao (taget-9)
Changed in magnum:
status: New → In Progress
Revision history for this message
Adrian Otto (aotto) wrote :

This raises a question: when we have container entities in Magnum that do not exist on the (docker host) node, should we rely on the client to clean them up, or should we have a maintenance process to discard them automatically under reasonable conditions, such as a particular age/duration of being in an error state, and a confirmation that in fact the container is absent from the node?

Revision history for this message
Eli Qiao (taget-9) wrote :

hi Adrian Otto, that is a good question, currently there is not enough flags of 'status' of a container

# possible status
ERROR = 'Error'
RUNNING = 'Running'
STOPPED = 'Stopped'
PAUSED = 'Paused'

let think about this case
user create a container in magnum, the entity is created in Magnum DB, but failed to created on the docker host,
there may be some fatal error which deny to create it on docker host(like duplicated name), I think for this case we can
add a new status named 'Failed', there need to be clean up.

and another containers, when try to inspect that containers failed, we can set it to Error,

I agree with you about inspecting the "Error" containers again, but for status 'Failed', we can add a periodic task to cleanup them.

would that make sense?

Eli.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnum (master)

Change abandoned by Adrian Otto (<email address hidden>) on branch: master
Review: https://review.openstack.org/199007
Reason: You are welcome to un-abandon this at any time, and submit revisions. I'm marking this as abandoned because of inactivity on the patch, in an effort to keep everything that's in our review queue as actionable for reviewers, or clearly marked as WIP.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/199007
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=fb8a7b38b711255c71674a7649c7b7997c273a35
Submitter: Jenkins
Branch: master

commit fb8a7b38b711255c71674a7649c7b7997c273a35
Author: Eli Qiao <email address hidden>
Date: Mon Jul 13 15:44:54 2015 +0800

    API: Handler exception when doing container-list

    Currently, when calling container-list, API service will loop for each
    container instance and try to call conductor's container_show method to inspect
    the container instance, but if there is exception happened when calling
    container_show, container-list will return nothing, this will cause user
    get nothing output even there are other good status containers exist.

    This patch improves the rpc calling process of containers, improve exception
    handling when list dockers, so inspect a docker instance failed won't effect
    others, set the container status to 'Unknow' to indicate this container can not
    be inspected, it's only a temporary status, won't be write to magnum DB.
    we just ignore exceptions when the inspect operation failed.

    Closes-Bug: #1472132
    Change-Id: If8586595cf47de6c86a90bb04d530ac0ff2cf102

Changed in magnum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
status: Fix Committed → 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.