← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1288940] [NEW] docker list_instances race condition with inspect_container results in None responses

 

Public bug reported:

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.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1288940

Title:
  docker list_instances race condition with inspect_container results in
  None responses

Status in OpenStack Compute (Nova):
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1288940/+subscriptions


Follow ups

References