[pve-devel] [PATCH manager] fix #2292: ceph osd create: use size parameter for db/wal
Dominik Csapak
d.csapak at proxmox.com
Fri Jul 19 08:56:18 CEST 2019
commit
5e0a75882378eb55ad16fd8e405a831cc4806c20
did not account for getting the correct size parameter from the api
call, so we ignored it always resulting in uses not be able to
set an explicit db/wal size
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
PVE/API2/Ceph/OSD.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm
index 3b432784..3c12abb5 100644
--- a/PVE/API2/Ceph/OSD.pm
+++ b/PVE/API2/Ceph/OSD.pm
@@ -275,7 +275,8 @@ __PACKAGE__->register_method ({
name => $type_devname,
};
- if (my $size = $param->{"${type}_size"}) {
+ (my $shorttype = $type) =~ s/_dev$//;
+ if (my $size = $param->{"${shorttype}_size"}) {
$devs->{$type}->{size} = PVE::Tools::convert_size($size, 'gb' => 'b') ;
}
}
--
2.20.1
More information about the pve-devel
mailing list