[Docker] Driver doesn't respect CPU limit

Bug #1256264 reported by Daniel Kuffner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Daniel Kuffner

Bug Description

The Nova Docker driver doesn't seem to respect the CPU limit defined by nova.
Please note I just reviewed the latest source code, haven't tested the behavior.
My assumption is that a docker container has access to all CPU resources by default.

On the docker command line this can be handled:

    docker run -c=<relative-weight> centos

Tags: docker
description: updated
Gary Kotton (garyk)
tags: added: docker
Revision history for this message
Daniel Kuffner (daniel-kuffner) wrote :
Changed in nova:
status: New → In Progress
assignee: nobody → Daniel Kuffner (daniel-kuffner)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/59824
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=751b1a04c9b14bdaf20d555e0aaa41bc276955c4
Submitter: Jenkins
Branch: master

commit 751b1a04c9b14bdaf20d555e0aaa41bc276955c4
Author: Daniel Kuffner <email address hidden>
Date: Thu Dec 5 10:34:53 2013 +0100

    Docker Driver doesn't respect CPU limit

    The docker driver doesn't respect the CPU settings of the configured
    flavor.

    Docker/LXC supports only relative cpu allocation. The relative
    cpu allocation doesn't prevent that a container can use all CPUs but it
    can at least ensure that a container with more CPUs gets more CPU
    cycles.

    DocImpact - Docker containers are now given CPU shares according to
    the vcpu setting of the flavor used when creating the container.
    Previously, the vcpu field was ignored and all containers got equal
    CPU shares, regardless of the vcpu setting.

    Change-Id: I7184eddfd8bbd2cbaa07a48ebb40bc9aa3fbd4a9
    Closes-Bug: #1256264

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