From 53aa77fd3ae9ca84ea1524ce28e8ccf6d82827e3 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Fri, 8 May 2015 11:32:36 -0700 Subject: [PATCH 1/2] Set 'CpusetCpus' with the value of the cpuset param in create_container --- docker/utils/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/utils/utils.py b/docker/utils/utils.py index a18939dedb..bca88de570 100644 --- a/docker/utils/utils.py +++ b/docker/utils/utils.py @@ -577,6 +577,7 @@ def create_container_config( 'Entrypoint': entrypoint, 'CpuShares': cpu_shares, 'Cpuset': cpuset, + 'CpusetCpus': cpuset, 'WorkingDir': working_dir, 'MemorySwap': memswap_limit, 'HostConfig': host_config, From 1f74262ab33c2fb8d6d73ccbe0541c137af234a3 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Fri, 8 May 2015 11:36:14 -0700 Subject: [PATCH 2/2] unit test --- tests/test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test.py b/tests/test.py index efcb37c33e..17a2e6b5dd 100644 --- a/tests/test.py +++ b/tests/test.py @@ -489,6 +489,7 @@ def test_create_container_with_cpuset(self): "StdinOnce": false, "NetworkDisabled": false, "Cpuset": "0,1", + "CpusetCpus": "0,1", "MemorySwap": 0}''')) self.assertEqual(args[1]['headers'], {'Content-Type': 'application/json'})