Browse Source

pids_limit not yet supported for swarm services - removing from v3 format

Signed-off-by: Joffrey F <[email protected]>
Joffrey F 8 years ago
parent
commit
b6fb3f2634
2 changed files with 2 additions and 2 deletions
  1. 0 1
      compose/config/config_schema_v3.0.json
  2. 2 1
      tests/integration/service_test.py

+ 0 - 1
compose/config/config_schema_v3.0.json

@@ -168,7 +168,6 @@
         "security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
         "shm_size": {"type": ["number", "string"]},
         "sysctls": {"$ref": "#/definitions/list_or_dict"},
-        "pids_limit": {"type": ["number", "string"]},
         "stdin_open": {"type": "boolean"},
         "stop_grace_period": {"type": "string", "format": "duration"},
         "stop_signal": {"type": "string"},

+ 2 - 1
tests/integration/service_test.py

@@ -115,12 +115,13 @@ class ServiceTest(DockerClientTestCase):
         service.start_container(container)
         self.assertEqual(container.get('HostConfig.ShmSize'), 67108864)
 
+    @pytest.mark.xfail(True, reason='Some kernels/configs do not support pids_limit')
     def test_create_container_with_pids_limit(self):
         self.require_api_version('1.23')
         service = self.create_service('db', pids_limit=10)
         container = service.create_container()
         service.start_container(container)
-        self.assertEqual(container.get('HostConfig.PidsLimit'), 10)
+        assert container.get('HostConfig.PidsLimit') == 10
 
     def test_create_container_with_extra_hosts_list(self):
         extra_hosts = ['somehost:162.242.195.82', 'otherhost:50.31.209.229']