]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Fix CNI error when net=host is not used in some podman calls
authorJohn Fulton <fulton@redhat.com>
Thu, 31 Jan 2019 21:17:20 +0000 (16:17 -0500)
committerSébastien Han <seb@redhat.com>
Tue, 5 Feb 2019 17:14:28 +0000 (18:14 +0100)
With 'podman version 1.0.0' on RHEL8 beta the 'get ceph version' and
'ceph monitor mkfs' commands fail [1] with "error configuring network
namespace for container Missing CNI default network".

When net=host is added these errors are resolved. net=host is used in
many other calls (grep -R net=host | wc -l --> 38).

Fixes: #3561
Signed-off-by: John Fulton <fulton@redhat.com>
(cherry picked from commit 410abd77455a92a85f0674577e22af0af894964f)

roles/ceph-container-common/tasks/main.yml
roles/ceph-mon/tasks/deploy_monitors.yml

index 01ebd2ccf77bc65181c1ac82438c5827bdbcf3ee..418d3594a818e857d37d6f9a1070649cda506ed8 100644 (file)
@@ -25,7 +25,7 @@
 
 - name: get ceph version
   command: >
-    {{ container_binary }} run --rm --entrypoint /usr/bin/ceph
+    {{ container_binary }} run --rm --net=host --entrypoint /usr/bin/ceph
     {{ ceph_client_docker_registry }}/{{ ceph_client_docker_image }}:{{ ceph_client_docker_image_tag }}
     --version
   changed_when: false
index 6ebafa46009ee7a6f8721118386c63046323e1ff..d89c5e89f7509fe4f298280c1197fb1e4829064c 100644 (file)
@@ -78,7 +78,7 @@
 
 - name: set_fact ceph-authtool container command
   set_fact:
-    ceph_authtool_cmd: "{{ container_binary + ' run --rm -v /var/lib/ceph:/var/lib/ceph:z -v /etc/ceph/:/etc/ceph/:z --entrypoint=ceph-authtool ' + ceph_client_docker_registry + '/' + ceph_client_docker_image + ':' + ceph_client_docker_image_tag if containerized_deployment else 'ceph-authtool' }}"
+    ceph_authtool_cmd: "{{ container_binary + ' run --net=host --rm -v /var/lib/ceph:/var/lib/ceph:z -v /etc/ceph/:/etc/ceph/:z --entrypoint=ceph-authtool ' + ceph_client_docker_registry + '/' + ceph_client_docker_image + ':' + ceph_client_docker_image_tag if containerized_deployment else 'ceph-authtool' }}"
 
 - name: import admin keyring into mon keyring
   command: >