public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] api: osd: destroy: remove mclock max iops settings
@ 2023-11-08 12:10 Aaron Lauterer
  2023-11-16 15:34 ` Maximiliano Sandoval
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Aaron Lauterer @ 2023-11-08 12:10 UTC (permalink / raw)
  To: pve-devel

Ceph does a quick benchmark when creating a new OSD and stores the
osd_mclock_max_capacity_iops_{ssd,hdd} settings in the config DB.

When destroying the OSD, Ceph does not automatically remove these
settings. Keeping them can be problematic if a new OSD with potentially
more performance is added and ends up getting the same OSD ID.

Therefore, we remove these settings ourselves when destroying an OSD.
Removing both variants, hdd and ssd should be fine, as the MON does not
complain if the setting does not exist.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
 PVE/API2/Ceph/OSD.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm
index 0c07e7ce..2893456a 100644
--- a/PVE/API2/Ceph/OSD.pm
+++ b/PVE/API2/Ceph/OSD.pm
@@ -985,6 +985,10 @@ __PACKAGE__->register_method ({
 	    print "Remove OSD $osdsection\n";
 	    $rados->mon_command({ prefix => "osd rm", ids => [ $osdsection ], format => 'plain' });
 
+	    print "Remove $osdsection mclock max capacity iops settings from config\n";
+	    $rados->mon_command({ prefix => "config rm", who => $osdsection, name => 'osd_mclock_max_capacity_iops_ssd' });
+	    $rados->mon_command({ prefix => "config rm", who => $osdsection, name => 'osd_mclock_max_capacity_iops_hdd' });
+
 	    # try to unmount from standard mount point
 	    my $mountpoint = "/var/lib/ceph/osd/ceph-$osdid";
 
-- 
2.39.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [pve-devel] [PATCH manager] api: osd: destroy: remove mclock max iops settings
  2023-11-08 12:10 [pve-devel] [PATCH manager] api: osd: destroy: remove mclock max iops settings Aaron Lauterer
@ 2023-11-16 15:34 ` Maximiliano Sandoval
  2023-11-17  7:09 ` [pve-devel] applied: " Thomas Lamprecht
  2024-01-03 13:43 ` [pve-devel] " Aaron Lauterer
  2 siblings, 0 replies; 4+ messages in thread
From: Maximiliano Sandoval @ 2023-11-16 15:34 UTC (permalink / raw)
  To: Proxmox VE development discussion


Tested on a new Proxmox VE 8 cluster. The mclock scheduler settings do
not appear in `ceph config dump` after removing the OSD using the web
UI. Removing a OSD without this setting being set does not cause any
issue either.

Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>

Aaron Lauterer <a.lauterer@proxmox.com> writes:

> Ceph does a quick benchmark when creating a new OSD and stores the
> osd_mclock_max_capacity_iops_{ssd,hdd} settings in the config DB.
>
> When destroying the OSD, Ceph does not automatically remove these
> settings. Keeping them can be problematic if a new OSD with potentially
> more performance is added and ends up getting the same OSD ID.
>
> Therefore, we remove these settings ourselves when destroying an OSD.
> Removing both variants, hdd and ssd should be fine, as the MON does not
> complain if the setting does not exist.
>
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
>  PVE/API2/Ceph/OSD.pm | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm
> index 0c07e7ce..2893456a 100644
> --- a/PVE/API2/Ceph/OSD.pm
> +++ b/PVE/API2/Ceph/OSD.pm
> @@ -985,6 +985,10 @@ __PACKAGE__->register_method ({
>  	    print "Remove OSD $osdsection\n";
>  	    $rados->mon_command({ prefix => "osd rm", ids => [ $osdsection ], format => 'plain' });
>
> +	    print "Remove $osdsection mclock max capacity iops settings from config\n";
> +	    $rados->mon_command({ prefix => "config rm", who => $osdsection, name => 'osd_mclock_max_capacity_iops_ssd' });
> +	    $rados->mon_command({ prefix => "config rm", who => $osdsection, name => 'osd_mclock_max_capacity_iops_hdd' });
> +
>  	    # try to unmount from standard mount point
>  	    my $mountpoint = "/var/lib/ceph/osd/ceph-$osdid";


--
Maximiliano




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pve-devel] applied: [PATCH manager] api: osd: destroy: remove mclock max iops settings
  2023-11-08 12:10 [pve-devel] [PATCH manager] api: osd: destroy: remove mclock max iops settings Aaron Lauterer
  2023-11-16 15:34 ` Maximiliano Sandoval
@ 2023-11-17  7:09 ` Thomas Lamprecht
  2024-01-03 13:43 ` [pve-devel] " Aaron Lauterer
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2023-11-17  7:09 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

Am 08/11/2023 um 13:10 schrieb Aaron Lauterer:
> Ceph does a quick benchmark when creating a new OSD and stores the
> osd_mclock_max_capacity_iops_{ssd,hdd} settings in the config DB.
> 
> When destroying the OSD, Ceph does not automatically remove these
> settings. Keeping them can be problematic if a new OSD with potentially
> more performance is added and ends up getting the same OSD ID.
> 
> Therefore, we remove these settings ourselves when destroying an OSD.
> Removing both variants, hdd and ssd should be fine, as the MON does not
> complain if the setting does not exist.
> 
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
>  PVE/API2/Ceph/OSD.pm | 4 ++++
>  1 file changed, 4 insertions(+)
> 
>

applied, with Maximiliano's T-b, thanks!




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [pve-devel] [PATCH manager] api: osd: destroy: remove mclock max iops settings
  2023-11-08 12:10 [pve-devel] [PATCH manager] api: osd: destroy: remove mclock max iops settings Aaron Lauterer
  2023-11-16 15:34 ` Maximiliano Sandoval
  2023-11-17  7:09 ` [pve-devel] applied: " Thomas Lamprecht
@ 2024-01-03 13:43 ` Aaron Lauterer
  2 siblings, 0 replies; 4+ messages in thread
From: Aaron Lauterer @ 2024-01-03 13:43 UTC (permalink / raw)
  To: pve-devel

ping?

On 11/8/23 13:10, Aaron Lauterer wrote:
> When destroying the OSD, Ceph does not automatically remove these




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-03 13:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-08 12:10 [pve-devel] [PATCH manager] api: osd: destroy: remove mclock max iops settings Aaron Lauterer
2023-11-16 15:34 ` Maximiliano Sandoval
2023-11-17  7:09 ` [pve-devel] applied: " Thomas Lamprecht
2024-01-03 13:43 ` [pve-devel] " Aaron Lauterer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal