public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager v2 1/2] ceph: mark global pg bits setting as deprecated
@ 2023-09-22  9:25 Maximiliano Sandoval
  2023-09-22  9:25 ` [pve-devel] [PATCH manager v2 2/2] ceph: api: use snake_case when setting options Maximiliano Sandoval
  2023-11-12 17:18 ` [pve-devel] applied-series: [PATCH manager v2 1/2] ceph: mark global pg bits setting as deprecated Thomas Lamprecht
  0 siblings, 2 replies; 4+ messages in thread
From: Maximiliano Sandoval @ 2023-09-22  9:25 UTC (permalink / raw)
  To: pve-devel

This setting was removed in [1] as part of the v13.0.2 tag. Running

    ceph config set global osd_pg_bits 42

results in

    Error EINVAL: unrecognized config option 'osd_pg_bits'

So we mark this api as deprecated and make it a no-op operation.

[1] https://github.com/ceph/ceph/commit/e6acf2d1d528a2395947d446a57bec04a3a002dc

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

Since this an API call, its hard for clients to get a warning thats logged on
the server and I opted for just marking the API as deprecated in its
description.

Differences from v1:
  - Instead of removing the api, mark it as deprecated

 PVE/API2/Ceph.pm | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
index 7e0763cf..fab4637c 100644
--- a/PVE/API2/Ceph.pm
+++ b/PVE/API2/Ceph.pm
@@ -158,10 +158,11 @@ __PACKAGE__->register_method ({
 		minimum => 1,
 		maximum => 7,
 	    },
+	    # TODO: deprecrated, remove with PVE 9
 	    pg_bits => {
 		description => "Placement group bits, used to specify the " .
-		    "default number of placement groups.\n\nNOTE: 'osd pool " .
-		    "default pg num' does not work for default pools.",
+		    "default number of placement groups.\n\nDepreacted. This " .
+		    "setting was deprecated in recent Ceph versions.",
 		type => 'integer',
 		default => 6,
 		optional => 1,
@@ -224,11 +225,6 @@ __PACKAGE__->register_method ({
 		$cfg->{client}->{keyring} = '/etc/pve/priv/$cluster.$name.keyring';
 	    }
 
-	    if ($param->{pg_bits}) {
-		$cfg->{global}->{'osd pg bits'} = $param->{pg_bits};
-		$cfg->{global}->{'osd pgp bits'} = $param->{pg_bits};
-	    }
-
 	    if ($param->{network}) {
 		$cfg->{global}->{'public network'} = $param->{network};
 		$cfg->{global}->{'cluster network'} = $param->{network};
-- 
2.39.2





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

* [pve-devel] [PATCH manager v2 2/2] ceph: api: use snake_case when setting options
  2023-09-22  9:25 [pve-devel] [PATCH manager v2 1/2] ceph: mark global pg bits setting as deprecated Maximiliano Sandoval
@ 2023-09-22  9:25 ` Maximiliano Sandoval
  2023-11-10 12:45   ` Maximiliano Sandoval
  2023-11-12 17:18 ` [pve-devel] applied-series: [PATCH manager v2 1/2] ceph: mark global pg bits setting as deprecated Thomas Lamprecht
  1 sibling, 1 reply; 4+ messages in thread
From: Maximiliano Sandoval @ 2023-09-22  9:25 UTC (permalink / raw)
  To: pve-devel

Continuation of ab70343982f36a5343d3fcf4a1a6489bd3f52a66. Discussion at
https://lists.proxmox.com/pipermail/pve-devel/2023-September/059013.html.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 PVE/API2/Ceph.pm | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
index fab4637c..81c17d6e 100644
--- a/PVE/API2/Ceph.pm
+++ b/PVE/API2/Ceph.pm
@@ -208,12 +208,12 @@ __PACKAGE__->register_method ({
 
 		$cfg->{global} = {
 		    'fsid' => $fsid,
-		    'auth cluster required' => $auth,
-		    'auth service required' => $auth,
-		    'auth client required' => $auth,
-		    'osd pool default size' => $param->{size} // 3,
-		    'osd pool default min size' => $param->{min_size} // 2,
-		    'mon allow pool delete' => 'true',
+		    'auth_cluster_required' => $auth,
+		    'auth_service_required' => $auth,
+		    'auth_client_required' => $auth,
+		    'osd_pool_default_size' => $param->{size} // 3,
+		    'osd_pool_default_min_size' => $param->{min_size} // 2,
+		    'mon_allow_pool_delete' => 'true',
 		};
 
 		# this does not work for default pools
@@ -226,12 +226,12 @@ __PACKAGE__->register_method ({
 	    }
 
 	    if ($param->{network}) {
-		$cfg->{global}->{'public network'} = $param->{network};
-		$cfg->{global}->{'cluster network'} = $param->{network};
+		$cfg->{global}->{'public_network'} = $param->{network};
+		$cfg->{global}->{'cluster_network'} = $param->{network};
 	    }
 
 	    if ($param->{'cluster-network'}) {
-		$cfg->{global}->{'cluster network'} = $param->{'cluster-network'};
+		$cfg->{global}->{'cluster_network'} = $param->{'cluster-network'};
 	    }
 
 	    cfs_write_file('ceph.conf', $cfg);
-- 
2.39.2





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

* Re: [pve-devel] [PATCH manager v2 2/2] ceph: api: use snake_case when setting options
  2023-09-22  9:25 ` [pve-devel] [PATCH manager v2 2/2] ceph: api: use snake_case when setting options Maximiliano Sandoval
@ 2023-11-10 12:45   ` Maximiliano Sandoval
  0 siblings, 0 replies; 4+ messages in thread
From: Maximiliano Sandoval @ 2023-11-10 12:45 UTC (permalink / raw)
  To: Maximiliano Sandoval; +Cc: pve-devel

Is there anything else missing on my end? The patch still applies.

Maximiliano Sandoval <m.sandoval@proxmox.com> writes:

> Continuation of ab70343982f36a5343d3fcf4a1a6489bd3f52a66. Discussion at
> https://lists.proxmox.com/pipermail/pve-devel/2023-September/059013.html.
>

--
Maximiliano




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

* [pve-devel] applied-series: [PATCH manager v2 1/2] ceph: mark global pg bits setting as deprecated
  2023-09-22  9:25 [pve-devel] [PATCH manager v2 1/2] ceph: mark global pg bits setting as deprecated Maximiliano Sandoval
  2023-09-22  9:25 ` [pve-devel] [PATCH manager v2 2/2] ceph: api: use snake_case when setting options Maximiliano Sandoval
@ 2023-11-12 17:18 ` Thomas Lamprecht
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2023-11-12 17:18 UTC (permalink / raw)
  To: Proxmox VE development discussion, Maximiliano Sandoval

Am 22/09/2023 um 11:25 schrieb Maximiliano Sandoval:
> This setting was removed in [1] as part of the v13.0.2 tag. Running
> 
>     ceph config set global osd_pg_bits 42
> 
> results in
> 
>     Error EINVAL: unrecognized config option 'osd_pg_bits'
> 
> So we mark this api as deprecated and make it a no-op operation.
> 
> [1] https://github.com/ceph/ceph/commit/e6acf2d1d528a2395947d446a57bec04a3a002dc
> 
> Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
> ---
> 
> Since this an API call, its hard for clients to get a warning thats logged on
> the server and I opted for just marking the API as deprecated in its
> description.
> 
> Differences from v1:
>   - Instead of removing the api, mark it as deprecated
> 
>  PVE/API2/Ceph.pm | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
>

applied both patches, thanks!




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

end of thread, other threads:[~2023-11-12 17:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-22  9:25 [pve-devel] [PATCH manager v2 1/2] ceph: mark global pg bits setting as deprecated Maximiliano Sandoval
2023-09-22  9:25 ` [pve-devel] [PATCH manager v2 2/2] ceph: api: use snake_case when setting options Maximiliano Sandoval
2023-11-10 12:45   ` Maximiliano Sandoval
2023-11-12 17:18 ` [pve-devel] applied-series: [PATCH manager v2 1/2] ceph: mark global pg bits setting as deprecated Thomas Lamprecht

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