fix missing osd info for osd 0

0 is falsy, we have to check for definedness
also adapt the tests so we test for this

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2019-07-03 08:43:12 +02:00
committed by Thomas Lamprecht
parent 099bb9a389
commit 35ccd3d004
3 changed files with 3 additions and 3 deletions

View File

@ -602,7 +602,7 @@ sub get_disks {
$journal_count += $ceph_volume->{journal} // 0;
$db_count += $ceph_volume->{db} // 0;
$wal_count += $ceph_volume->{wal} // 0;
if ($ceph_volume->{osdid}) {
if (defined($ceph_volume->{osdid})) {
$osdid = $ceph_volume->{osdid};
$bluestore = 1 if $ceph_volume->{bluestore};
}