docker plugin add cpu set property

Bug #1439042 reported by LiangChen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
LiangChen

Bug Description

Docker API 1.12 and docker-py 0.6.0 support the cpuset parameter when
creating containers(docker run --cpuset="").

 We can control the CPUs in which to allow execution with the --cpuset flag.(such as 0-3 or 0,1,2 etc)

Reference:
https://github.com/docker/docker/blob/455a272aef4e109ce57c20f9ea224e4d4b32ece7/runconfig/hostconfig.go
http://docs.docker.com/reference/api/docker_remote_api_v1.12/
https://github.com/docker/docker-py/blob/master/docs/change_log.md

LiangChen (hs-chen)
Changed in heat:
assignee: nobody → LiangChen (hs-chen)
Revision history for this message
Steve Baker (steve-stevebaker) wrote :

As an aside, we discourage the use of the docker resource - that is why it is in contrib.

Is there a reason why you don't want to use docker by building an image that uses the heat-config-docker-compose hook?

https://github.com/openstack/heat-templates/tree/master/hot/software-config/elements

Revision history for this message
LiangChen (hs-chen) wrote :

Hi, I'm sorry I'm not hear about the "heat-config-docker-compose" before.

It looks good to me, Unfortunately I see that "Compose is great for development environments, staging servers, and CI. We don't recommend that you use it in production yet."from the http://docs.docker.com/compose/.

Could you please tell me is there someone use compose in production?
What the reason why docker company don't recommend use it?

I'm sorry if my question is a bit stupid.

Revision history for this message
Steve Baker (steve-stevebaker) wrote :

docker-compose is only one of the docker hooks being developed. There is also the kubelet hook[1] and the original docker hook (which was removed)

The original docker hook uses docker-py and takes a config resource describing a kubernetes-style pod definition.

It was deleted because the kubelet hook does much the same thing. I've wondered if the docker hook should be rewritten to be as close as possible to the contrib docker resource to ease the transition for any existing docker resource users.

And to be clear, we view the docker resource to be insecure because it results in heat-engine interacting directly with a single-tenant API, which creates a security risk due to stacks from other tenants trying to interact directly too.

[1] https://review.openstack.org/#/c/140887/

Revision history for this message
Rabi Mishra (rabi) wrote :

Hi LiangChen,

The reason 'docker-compose' is not currently recommended for production is due it's brute-force “delete and recreate everything” approach. i.e. If you modify a project config, the project is recreated.

Docker itself does not support ability to make container configuration changes on (running) containers. You have to stop the container to make any changes.

Also, support for partially modifying the config with parameters for different environments and then deploy them is there in the roadmap.

https://github.com/docker/compose/blob/master/ROADMAP.md

If your containers use case with OpenStack is fine with this approach(which should be the case for any 'cattle' workload), you can use this.

Revision history for this message
Rabi Mishra (rabi) wrote :

In the docker-compose hook, we also ensure that we don't delete and recreate a project if there are no changes in the config resource.

Revision history for this message
LiangChen (hs-chen) wrote :

Thanks for all your information.
I will try to use it as soon as possible, at the same time, I will done this bug of heat-docker.

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

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

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

Reviewed: https://review.openstack.org/173652
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=519efffdb09863d51dc25598c8d966e8db7b9e74
Submitter: Jenkins
Branch: master

commit 519efffdb09863d51dc25598c8d966e8db7b9e74
Author: LiangChen <email address hidden>
Date: Wed Apr 15 10:16:22 2015 +0800

    Docker plugin add cpu set property

    Change-Id: I96763d0bc293baee044f79d0bc3123adf40c0728
    Closes-bug: #1439042

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-1 → 5.0.0
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.