cv: expose host ipc namespace to ceph-volume container

this is needed to properly handle semaphore synchronization for udev
actions via dmcrypt/cryptsetup.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1683770

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
(cherry picked from commit 15812970f0)

# Conflicts:
#	library/ceph_volume.py
pull/3657/head
Noah Watkins 2019-02-27 16:05:19 -08:00 committed by mergify[bot]
parent b7f5233d07
commit 58a527c192
1 changed files with 6 additions and 0 deletions

View File

@ -182,8 +182,14 @@ def container_exec(binary, container_image):
''' '''
Build the docker CLI to run a command inside a container Build the docker CLI to run a command inside a container
''' '''
<<<<<<< HEAD
command_exec = ['docker', 'run', '--rm', '--privileged', '--net=host', command_exec = ['docker', 'run', '--rm', '--privileged', '--net=host',
=======
container_binary = os.getenv('CEPH_CONTAINER_BINARY')
command_exec = [container_binary, 'run',
'--rm', '--privileged', '--net=host', '--ipc=host',
>>>>>>> 15812970... cv: expose host ipc namespace to ceph-volume container
'-v', '/run/lock/lvm:/run/lock/lvm:z', '-v', '/run/lock/lvm:/run/lock/lvm:z',
'-v', '/var/run/udev/:/var/run/udev/:z', '-v', '/var/run/udev/:/var/run/udev/:z',
'-v', '/dev:/dev', '-v', '/etc/ceph:/etc/ceph:z', '-v', '/dev:/dev', '-v', '/etc/ceph:/etc/ceph:z',