This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
osd_volume_activate: open encrypted legacy parts
When managing legacy ceph-disk based OSD with ceph-volume then we need to open the encrypted partitions before running the ceph-volume simple scan command otherwise the scan will fail. This situation happens after a reboot because all encrypted partitions are closed. $ ceph-volume simple scan /dev/sdb1 --force (...) --> broken symlink found /tmp/tmpept0ox2j/block -> /dev/mapper/457d7196-4015-40fe-aa83-a160477450f7 $ ceph-volume.log (...) [ceph_volume.util.system][INFO ] /dev/sdb1 was not found as mounted [ceph_volume.util.encryption][WARNING] failed to detect device mapper information [ceph_volume.util.encryption][WARNING] failed to detect device mapper information [ceph_volume.devices.simple.scan][WARNING] broken symlink found /tmp/tmpept0ox2j/block -> /dev/mapper/457d7196-4015-40fe-aa83-a160477450f7 [ceph_volume.devices.simple.scan][ERROR ] skipping due to IOError on file: /tmp/tmpept0ox2j/block Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/ceph_volume/devices/simple/scan.py", line 118, in scan_directory if system.is_binary(file_path): File "/usr/lib/python3.6/site-packages/ceph_volume/util/system.py", line 116, in is_binary with open(path, 'rb') as fp: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpept0ox2j/block' [ceph_volume.util.encryption][WARNING] failed to detect device mapper information [ceph_volume.devices.simple.scan][INFO ] skipping binary file: /tmp/tmpept0ox2j/block_dmcrypt Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1792122 Signed-off-by: Dimitri Savineau <[email protected]> (cherry picked from commit d07436a)
- Loading branch information