From 8a154ae14a3eb24322b498a2afce19ea4d3672c0 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 5 Aug 2020 10:27:23 +0200 Subject: [PATCH] osd: change lvm bindmount This commit makes the bindmount a bit more generic, otherwise it currently makes the OSDs failing to start in an OSP FFU upgrade (with RHEL7 > RHEL8 OS upgrade). docker2podman playbook is run from ceph-ansible stable-3.2 branch against RHEL7 nodes where `/var/run/lvmetad.socket` exists but once the system is upgraded to RHEL8, this socket doesn't exist anymore and prevent OSDs from starting after the reboot. As a workaround we can make this bindmount a bit more generic like what is done in `stable-4.0` branch by mounting `/run/lvm` instead. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1866252 Signed-off-by: Guillaume Abrioux --- roles/ceph-osd/tasks/start_osds.yml | 2 +- roles/ceph-osd/templates/ceph-osd-run.sh.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/ceph-osd/tasks/start_osds.yml b/roles/ceph-osd/tasks/start_osds.yml index ccb23e281..a86308e21 100644 --- a/roles/ceph-osd/tasks/start_osds.yml +++ b/roles/ceph-osd/tasks/start_osds.yml @@ -72,7 +72,7 @@ - name: set_fact docker_exec_start_osd set_fact: - docker_exec_start_osd: "{{ 'docker run --rm --ulimit nofile=1024:4096 --privileged=true -v /run/lvm/lvmetad.socket:/run/lvm/lvmetad.socket -v /var/run/udev/:/var/run/udev/:z -v /etc/ceph:/etc/ceph:z -v /dev:/dev --entrypoint=ceph-volume ' + ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else 'ceph-volume' }}" + docker_exec_start_osd: "{{ 'docker run --rm --ulimit nofile=1024:4096 --privileged=true -v /run/lvm/:/run/lvm/ -v /var/run/udev/:/var/run/udev/:z -v /etc/ceph:/etc/ceph:z -v /dev:/dev --entrypoint=ceph-volume ' + ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment else 'ceph-volume' }}" when: osd_scenario == 'lvm' - name: collect osd ids diff --git a/roles/ceph-osd/templates/ceph-osd-run.sh.j2 b/roles/ceph-osd/templates/ceph-osd-run.sh.j2 index 675f221be..3cd1a9b80 100644 --- a/roles/ceph-osd/templates/ceph-osd-run.sh.j2 +++ b/roles/ceph-osd/templates/ceph-osd-run.sh.j2 @@ -136,7 +136,7 @@ numactl \ -e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES={{ ceph_tcmalloc_max_total_thread_cache }} \ {% endif -%} {% if osd_scenario == 'lvm' -%} - -v /run/lvm/lvmetad.socket:/run/lvm/lvmetad.socket \ + -v /run/lvm/:/run/lvm/ \ -e CEPH_DAEMON=OSD_CEPH_VOLUME_ACTIVATE \ -e OSD_ID="$1" \ {% else -%}