Selaa lähdekoodia

Merge pull request #8280 from aiordache/ipc_recreate

Add IPC mode to the config hash
Ulysses Souza 4 vuotta sitten
vanhempi
sitoutus
0bea52b18d
2 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 1 0
      compose/service.py
  2. 3 1
      tests/unit/service_test.py

+ 1 - 0
compose/service.py

@@ -713,6 +713,7 @@ class Service:
             'image_id': image_id(),
             'links': self.get_link_names(),
             'net': self.network_mode.id,
+            'ipc_mode': self.ipc_mode.mode,
             'networks': self.networks,
             'secrets': self.secrets,
             'volumes_from': [

+ 3 - 1
tests/unit/service_test.py

@@ -330,7 +330,7 @@ class ServiceTest(unittest.TestCase):
         assert service.options['environment'] == environment
 
         assert opts['labels'][LABEL_CONFIG_HASH] == \
-            '689149e6041a85f6fb4945a2146a497ed43c8a5cbd8991753d875b165f1b4de4'
+            '6da0f3ec0d5adf901de304bdc7e0ee44ec5dd7adb08aebc20fe0dd791d4ee5a8'
         assert opts['environment'] == ['also=real']
 
     def test_get_container_create_options_sets_affinity_with_binds(self):
@@ -700,6 +700,7 @@ class ServiceTest(unittest.TestCase):
         config_dict = service.config_dict()
         expected = {
             'image_id': 'abcd',
+            'ipc_mode': None,
             'options': {'image': 'example.com/foo'},
             'links': [('one', 'one')],
             'net': 'other',
@@ -723,6 +724,7 @@ class ServiceTest(unittest.TestCase):
         config_dict = service.config_dict()
         expected = {
             'image_id': 'abcd',
+            'ipc_mode': None,
             'options': {'image': 'example.com/foo'},
             'links': [],
             'networks': {},