From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 533D61FF1F0 for ; Wed, 24 Jul 2024 17:05:36 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7FD521E8C3; Wed, 24 Jul 2024 17:06:09 +0200 (CEST) From: Max Carrara To: pve-devel@lists.proxmox.com Date: Wed, 24 Jul 2024 17:05:11 +0200 Message-Id: <20240724150511.474844-6-m.carrara@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240724150511.474844-1-m.carrara@proxmox.com> References: <20240724150511.474844-1-m.carrara@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.029 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH v3 pve-manager 5/5] fix #5366: api: ceph: change version format in OSD metadata endpoint X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" .. in order to include Ceph's build commit. Instead of e.g. 18.2.2 (reef) the string will now contain: 18.2.2 (build: e9fe820e7) reef This format is used in the OSD detail view; the build commit will therefore also be shown there. Signed-off-by: Max Carrara Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=5366 --- Changes v2 --> v3: * put 'build: ' in front of build commit (thanks Thomas!) * reword commit title * add 'Fixes' trailer Changes v1 --> v2: * NEW PVE/API2/Ceph/OSD.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm index 1ff51fbd..88b7142b 100644 --- a/PVE/API2/Ceph/OSD.pm +++ b/PVE/API2/Ceph/OSD.pm @@ -747,6 +747,12 @@ __PACKAGE__->register_method ({ my $osd_pss_memory = eval { get_proc_pss_from_pid($pid) } // 0; warn $@ if $@; + my ($ceph_version, $ceph_buildcommit) = PVE::Ceph::Tools::parse_ceph_version( + $metadata->{ceph_version} + ); + + $ceph_buildcommit = substr($ceph_buildcommit, 0, 9); + my $data = { osd => { hostname => $metadata->{hostname}, @@ -755,7 +761,7 @@ __PACKAGE__->register_method ({ osd_data => $metadata->{osd_data}, osd_objectstore => $metadata->{osd_objectstore}, pid => $pid, - version => "$metadata->{ceph_version_short} ($metadata->{ceph_release})", + version => "$ceph_version (build: $ceph_buildcommit) $metadata->{ceph_release}", front_addr => $metadata->{front_addr}, back_addr => $metadata->{back_addr}, hb_front_addr => $metadata->{hb_front_addr}, -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel