From 45a98e7fef358e6cd1cc1a6f7e8169034df69b87 Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Mon, 7 Aug 2023 12:04:10 +0300 Subject: [PATCH] ceph-volume: make raw prepare use encryption_units.prepare_dmcrypt Signed-off-by: Igor Fedotov (cherry picked from commit 2c3477a69e2e01e999ff23ecf4a6508c87c340de) --- src/ceph-volume/ceph_volume/devices/raw/prepare.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/ceph-volume/ceph_volume/devices/raw/prepare.py b/src/ceph-volume/ceph_volume/devices/raw/prepare.py index 3c96eedacf34a..2179db2331a4e 100644 --- a/src/ceph-volume/ceph_volume/devices/raw/prepare.py +++ b/src/ceph-volume/ceph_volume/devices/raw/prepare.py @@ -22,18 +22,7 @@ def prepare_dmcrypt(key, device, device_type, fsid): return '' kname = disk.lsblk(device)['KNAME'] mapping = 'ceph-{}-{}-{}-dmcrypt'.format(fsid, kname, device_type) - # format data device - encryption_utils.luks_format( - key, - device - ) - encryption_utils.luks_open( - key, - device, - mapping - ) - - return '/dev/mapper/{}'.format(mapping) + return encryption_utils.prepare_dmcrypt(key, device, mapping) def prepare_bluestore(block, wal, db, secrets, osd_id, fsid, tmpfs): """ -- 2.39.5