]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
switch_to_containers: umount osd lockbox partition
authorDimitri Savineau <dsavinea@redhat.com>
Mon, 7 Oct 2019 19:47:52 +0000 (15:47 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 7 Oct 2019 22:45:52 +0000 (00:45 +0200)
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>
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index a52ee2394d1602649032d4f5c35b7d5851e8e5ca..ad005cd548491ffbe774e48a31e50f76b37e2470 100644 (file)
 
     - 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: "{{ osd_dirs.stdout_lines }}"