switch_to_containers: umount osd lockbox partition

When switching from a baremetal deployment to a containerized deployment
we only umount the OSD data partition.
If the OSD is encrypted (dmcrypt: true) then there's an additional
partition (part number 5) used for the lockbox and mount in the
/var/lib/ceph/osd-lockbox/ directory.
Because this partition isn't umount then the containerized OSD aren't
able to start. The partition is still mount by the system and can't be
remount from the container.

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

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 19edf707a5)
pull/4572/head v3.2.30
Dimitri Savineau 2019-10-07 15:47:52 -04:00 committed by Guillaume Abrioux
parent 2e44b6af74
commit 2d40e3923f
1 changed files with 2 additions and 2 deletions

View File

@ -267,13 +267,13 @@
- name: get osd directories
command: >
ls -1 /var/lib/ceph/osd
find /var/lib/ceph/osd {% if dmcrypt | bool %}/var/lib/ceph/osd-lockbox{% endif %} -maxdepth 1 -mindepth 1 -type d
register: osd_dirs
changed_when: false
- name: unmount all the osd directories
command: >
umount /var/lib/ceph/osd/{{ item }}
umount {{ item }}
changed_when: false
failed_when: false
with_items: