Merge "Fix ipc_mode comparison in the latest docker"
This commit is contained in:
commit
d2f5570823
@ -310,8 +310,10 @@ class DockerWorker(object):
|
|||||||
if not current_ipc_mode:
|
if not current_ipc_mode:
|
||||||
current_ipc_mode = None
|
current_ipc_mode = None
|
||||||
|
|
||||||
if new_ipc_mode != current_ipc_mode:
|
# only check IPC mode if it is specified
|
||||||
|
if new_ipc_mode is not None and new_ipc_mode != current_ipc_mode:
|
||||||
return True
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def compare_cap_add(self, container_info):
|
def compare_cap_add(self, container_info):
|
||||||
new_cap_add = self.params.get('cap_add', list())
|
new_cap_add = self.params.get('cap_add', list())
|
||||||
@ -744,7 +746,10 @@ def generate_module():
|
|||||||
name=dict(required=False, type='str'),
|
name=dict(required=False, type='str'),
|
||||||
environment=dict(required=False, type='dict'),
|
environment=dict(required=False, type='dict'),
|
||||||
image=dict(required=False, type='str'),
|
image=dict(required=False, type='str'),
|
||||||
ipc_mode=dict(required=False, type='str', choices=['host', '']),
|
ipc_mode=dict(required=False, type='str', choices=['',
|
||||||
|
'host',
|
||||||
|
'private',
|
||||||
|
'shareable']),
|
||||||
cap_add=dict(required=False, type='list', default=list()),
|
cap_add=dict(required=False, type='list', default=list()),
|
||||||
security_opt=dict(required=False, type='list', default=list()),
|
security_opt=dict(required=False, type='list', default=list()),
|
||||||
pid_mode=dict(required=False, type='str', choices=['host', '']),
|
pid_mode=dict(required=False, type='str', choices=['host', '']),
|
||||||
|
@ -57,7 +57,10 @@ class ModuleArgsTest(base.BaseTestCase):
|
|||||||
name=dict(required=False, type='str'),
|
name=dict(required=False, type='str'),
|
||||||
environment=dict(required=False, type='dict'),
|
environment=dict(required=False, type='dict'),
|
||||||
image=dict(required=False, type='str'),
|
image=dict(required=False, type='str'),
|
||||||
ipc_mode=dict(required=False, type='str', choices=['host', '']),
|
ipc_mode=dict(required=False, type='str', choices=['',
|
||||||
|
'host',
|
||||||
|
'private',
|
||||||
|
'shareable']),
|
||||||
cap_add=dict(required=False, type='list', default=list()),
|
cap_add=dict(required=False, type='list', default=list()),
|
||||||
security_opt=dict(required=False, type='list', default=list()),
|
security_opt=dict(required=False, type='list', default=list()),
|
||||||
pid_mode=dict(required=False, type='str', choices=['host', '']),
|
pid_mode=dict(required=False, type='str', choices=['host', '']),
|
||||||
|
Loading…
Reference in New Issue
Block a user