all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 1/2] api: ceph mds: avoid creating MDS when ID starts with number
Date: Wed, 10 Jul 2024 14:42:59 +0200	[thread overview]
Message-ID: <20240710124300.295817-2-a.lauterer@proxmox.com> (raw)
In-Reply-To: <20240710124300.295817-1-a.lauterer@proxmox.com>

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@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2024-07-10 12:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10 12:42 [pve-devel] [PATCH manager 0/2] fix #5570 ceph mds: allow custom MDS IDs from the UI Aaron Lauterer
2024-07-10 12:42 ` Aaron Lauterer [this message]
2024-07-10 12:43 ` [pve-devel] [PATCH manager 2/2] fix#5570 ui: ceph: make MDS ID configurable Aaron Lauterer
2024-07-10 13:59   ` Christoph Heiss
2024-07-10 14:18     ` Aaron Lauterer
2024-07-10 14:24       ` Christoph Heiss
2024-07-10 13:59 ` [pve-devel] [PATCH manager 0/2] fix #5570 ceph mds: allow custom MDS IDs from the UI Christoph Heiss
2024-07-22 16:57 ` [pve-devel] applied-series: " Thomas Lamprecht
2024-07-23  6:52   ` Aaron Lauterer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240710124300.295817-2-a.lauterer@proxmox.com \
    --to=a.lauterer@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal