Skip to content

Commit

Permalink
[ceph][luks] Fix ceph cephvolumescan for cephadm
Browse files Browse the repository at this point in the history
For cephadm the containers are named ceph-<hash>-osd... while
ceph-ansible still uses the ceph-osd-...

Other issue is that OSDs can have multiple volumes in them so filtering
just for the first one is wrong and we need to check each volume for
the encryption.

Resolves: rhbz#2264543
Fixes: https://issues.redhat.com/browse/RHEL-25838
  • Loading branch information
xbezdick committed Feb 20, 2024
1 parent 6421225 commit b9caf27
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from leapp.models import InstalledRPM

CEPH_CONF = "/etc/ceph/ceph.conf"
CONTAINER = "ceph-osd"
CONTAINER = "ceph-.*osd"


def select_osd_container(engine):
Expand Down Expand Up @@ -63,7 +63,8 @@ def encrypted_osds_list():
output = get_ceph_lvm_list()
if output is not None:
try:
result = [output[key][0]['lv_uuid'] for key in output if output[key][0]['tags']['ceph.encrypted']]
for key in output:
result.extend([element['lv_uuid'] for element in output[key] if element['tags']['ceph.encrypted']])
except KeyError:
# TODO: possibly raise a report item with a medium risk factor
# TODO: possibly create list of problematic osds, extend the cephinfo
Expand Down

0 comments on commit b9caf27

Please sign in to comment.