docker list_instances race condition with inspect_container results in None responses

Bug #1288940 reported by Erica Windisch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nova-docker
Fix Committed
High
Erica Windisch

Bug Description

The docker hypervisor plugin has a race condition during list_instances where the instance list is constructed by creating a listing of containers, then extracting instance names from the result of inspecting that container. It may happen that the between fetching the list of running containers and inspecting those containers, that those containers may be deleted.

If a container is deleted after fetching the container list, the nova.virt.docker.client.inspect_container method will return None. In the typical case, this will cause an Exception to be raised, failing the instance_list, as list_instances naively presumes that the result of inspect_container will be a dictionary.

Furthermore, list_instances takes an 'inspect' kwarg specific to Docker (this should move to a private method, but that is another bug)... in that case, the results of list_instances will contain None elements which are expected to be dictionaries.

Revision history for this message
Erica Windisch (ewindisch) wrote :
Changed in nova:
assignee: nobody → Eric Windisch (ewindisch)
importance: Undecided → High
status: New → In Progress
affects: nova → nova-docker
Changed in nova-docker:
status: In Progress → Fix Committed
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.