[pve-devel] [PATCH manager 1/2] api: ceph mds: avoid creating MDS when ID starts with number
Aaron Lauterer
a.lauterer at proxmox.com
Wed Jul 10 14:42:59 CEST 2024
Ceph MDS IDs cannot start with a number [0].
[0] https://docs.ceph.com/en/latest/man/8/ceph-mds/
Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
PVE/API2/Ceph/MDS.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/PVE/API2/Ceph/MDS.pm b/PVE/API2/Ceph/MDS.pm
index 6fc0ae45..d99eebe6 100644
--- a/PVE/API2/Ceph/MDS.pm
+++ b/PVE/API2/Ceph/MDS.pm
@@ -133,6 +133,8 @@ __PACKAGE__->register_method ({
my $mds_id = $param->{name} // $nodename;
+ die "ID of the MDS cannot start with a number!\n" if ($mds_id =~ /^[0-9]/);
+
my $worker = sub {
my $timeout = PVE::Ceph::Tools::get_config('long_rados_timeout');
my $rados = PVE::RADOS->new(timeout => $timeout);
--
2.39.2
More information about the pve-devel
mailing list