fix #2266: Diskmanage: get correct osd id
The osdid can consist of multiple digits, cope with that and add more regression tests for this Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
0841d128be
commit
79f4a7bfd3
@ -258,7 +258,7 @@ sub get_ceph_volume_infos {
|
||||
if ($fields->[1] =~ m|^osd-([^-]+)-|) {
|
||||
my $type = $1;
|
||||
# $result autovivification is wanted, to not creating empty hashes
|
||||
if (($type eq 'block' || $type eq 'data') && $fields->[2] =~ m/ceph.osd_id=([^,])/) {
|
||||
if (($type eq 'block' || $type eq 'data') && $fields->[2] =~ m/ceph.osd_id=([^,]+)/) {
|
||||
$result->{$dev}->{osdid} = $1;
|
||||
$result->{$dev}->{bluestore} = ($type eq 'block');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user