Docker cannot start a new instance because of an internal error

Bug #1278104 reported by Daniel Kuffner
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Daniel Kuffner

Bug Description

Cannot create new instances because of an internal error. It seems like that the docker client returns None instead of a empty array if not a single container is started.

Update:
The root cause for the issue is that the docker v1.8 rest API doesn't longer deliver the container list for v1.4 api calls. We must upgrade to >= 1.7 in order to make the docker driver working again.

Additional does docker not set the Content-Type correctly. The docker client expects that the Content-Type is application/json but it is plain/text. The parsing of the content will be skipped in this case.
Please see also: https://github.com/dotcloud/docker/pull/3974

Stacktrace:
2014-02-09 15:01:44.077 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/compute/manager.py", line 821, in init_host
2014-02-09 15:01:44.077 TRACE nova.openstack.common.threadgroup self._destroy_evacuated_instances(context)
2014-02-09 15:01:44.077 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/compute/manager.py", line 532, in _destroy_evacuated_instances
2014-02-09 15:01:44.077 TRACE nova.openstack.common.threadgroup local_instances = self._get_instances_on_driver(context, filters)
2014-02-09 15:01:44.077 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/compute/manager.py", line 511, in _get_instances_on_driver
2014-02-09 15:01:44.077 TRACE nova.openstack.common.threadgroup driver_instances = self.driver.list_instances()
2014-02-09 15:01:44.077 TRACE nova.openstack.common.threadgroup File "/opt/stack/nova/nova/virt/docker/driver.py", line 96, in list_instances
2014-02-09 15:01:44.077 TRACE nova.openstack.common.threadgroup for container in self.docker.list_containers():
2014-02-09 15:01:44.077 TRACE nova.openstack.common.threadgroup TypeError: 'NoneType' object is not iterable
2014-02-09 15:01:44.077 TRACE nova.openstack.common.threadgroup

Tags: docker
Changed in nova:
assignee: nobody → Daniel Kuffner (daniel-kuffner)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/72147

Changed in nova:
status: New → In Progress
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/72147
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=423f344c59da1eecd7ab8bbb905abc1ff5948b14
Submitter: Jenkins
Branch: master

commit 423f344c59da1eecd7ab8bbb905abc1ff5948b14
Author: Daniel Kuffner <email address hidden>
Date: Sun Feb 9 16:22:12 2014 +0100

    Docker cannot start a new instance because of an internal error

    The root cause for the issue is that the Docker rest API does not
    longer deliver the container list for v1.4 api calls.
    The Docker API must be upgraded to 1.7.

    Docker API 1.7 is a good choice since that is the first docker version
    which officially supports rhel/centos.

    In addition will docker client only parse json if the response needed
    (to_json()) and this method will not catch json parse exception which makes
    finding th eroot cause of a problem in the future easier.

    Change-Id: I53dfac5f09ee021c6ed4763f7f164206e8ab32ff
    Closes-Bug: #1278104

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-3
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.1
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.