Add --ipc support
This patch allows paunch to optionally configure docker containers with --ipc=host. This is required for some configurations of OpenStack Cinder using local machine LVM storage. Change-Id: I8d8f0bcc50c0a7364fc6e3b84dd573f7e7439c3b Partial-bug: #1668920
This commit is contained in:
parent
82d6ff40fd
commit
d33bbb877d
|
@ -137,6 +137,8 @@ class ComposeV1Builder(object):
|
|||
cmd.append('--env=%s' % v)
|
||||
if 'net' in cconfig:
|
||||
cmd.append('--net=%s' % cconfig['net'])
|
||||
if 'ipc' in cconfig:
|
||||
cmd.append('--ipc=%s' % cconfig['ipc'])
|
||||
if 'pid' in cconfig:
|
||||
cmd.append('--pid=%s' % cconfig['pid'])
|
||||
if 'privileged' in cconfig:
|
||||
|
|
|
@ -314,6 +314,7 @@ three-12345678 three''', '', 0),
|
|||
'privileged': True,
|
||||
'user': 'bar',
|
||||
'net': 'host',
|
||||
'ipc': 'host',
|
||||
'pid': 'container:bar',
|
||||
'restart': 'always',
|
||||
'env_file': '/tmp/foo.env',
|
||||
|
@ -326,7 +327,7 @@ three-12345678 three''', '', 0),
|
|||
self.assertEqual(
|
||||
['docker', 'run', '--name', 'one',
|
||||
'--detach=true', '--env-file=/tmp/foo.env',
|
||||
'--net=host', '--pid=container:bar',
|
||||
'--net=host', '--ipc=host', '--pid=container:bar',
|
||||
'--privileged=true', '--restart=always', '--user=bar',
|
||||
'centos:7'],
|
||||
cmd
|
||||
|
|
Loading…
Reference in New Issue