From: Guillaume Abrioux Date: Thu, 18 Oct 2018 20:29:02 +0000 (+0200) Subject: iscsi: fix networking issue on containerized env X-Git-Tag: v3.2.0beta7~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8fa437b7bd53a4a1057fc82229c6b0b47ed5d3d1;p=ceph-ansible.git iscsi: fix networking issue on containerized env The iscsi-gw containers can't reach monitors without `--net=host` Signed-off-by: Guillaume Abrioux --- diff --git a/roles/ceph-iscsi-gw/templates/rbd-target-api.service.j2 b/roles/ceph-iscsi-gw/templates/rbd-target-api.service.j2 index 69781693d..2cc19231f 100644 --- a/roles/ceph-iscsi-gw/templates/rbd-target-api.service.j2 +++ b/roles/ceph-iscsi-gw/templates/rbd-target-api.service.j2 @@ -16,6 +16,7 @@ ExecStart=/usr/bin/docker run --rm \ -v /etc/localtime:/etc/localtime:ro \ --privileged \ --cap-add=ALL \ + --net=host \ -v /dev:/dev \ -v /lib/modules:/lib/modules \ -v /etc/ceph:/etc/ceph \ diff --git a/roles/ceph-iscsi-gw/templates/rbd-target-gw.service.j2 b/roles/ceph-iscsi-gw/templates/rbd-target-gw.service.j2 index 3aa18d1c1..672988498 100644 --- a/roles/ceph-iscsi-gw/templates/rbd-target-gw.service.j2 +++ b/roles/ceph-iscsi-gw/templates/rbd-target-gw.service.j2 @@ -16,6 +16,7 @@ ExecStart=/usr/bin/docker run --rm \ -v /etc/localtime:/etc/localtime:ro \ --privileged \ --cap-add=ALL \ + --net=host \ -v /dev:/dev \ -v /lib/modules:/lib/modules \ -v /etc/ceph:/etc/ceph \ diff --git a/roles/ceph-iscsi-gw/templates/tcmu-runner.service.j2 b/roles/ceph-iscsi-gw/templates/tcmu-runner.service.j2 index 8159125f5..bbaf58ee7 100644 --- a/roles/ceph-iscsi-gw/templates/tcmu-runner.service.j2 +++ b/roles/ceph-iscsi-gw/templates/tcmu-runner.service.j2 @@ -15,6 +15,7 @@ ExecStart=/usr/bin/docker run --rm \ {% endif -%} -v /etc/localtime:/etc/localtime:ro \ --privileged \ + --net=host \ --cap-add=ALL \ -v /dev:/dev \ -v /lib/modules:/lib/modules \