[pve-devel] applied: [PATCH manager] fix #5010: ceph: pool set only changed properties

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Jul 22 19:02:43 CEST 2024


Am 09/07/2024 um 13:41 schrieb Aaron Lauterer:
> By only setting propterties that have changed, we can avoid potential
> errors in the task.
> 
> For example, if one configures the "nosizechange" property on a pool, to
> prevent accidential size changes, the task will now only error if the
> user is actually trying to change the size.
> 
> Prior to this patch, we would always try to set all parameters, even if
> they were the same value. In the above example, this would result in the
> task ending in error state, as we are not allowed to change the size.
> 
> To disable size changing you can run the following command:
> ceph osd pool set {pool} nosizechange 1
> 
> Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
> ---
> 
> I am not sure if we want to log every property that is skipped. It makes
> visible what is done, but is also a bit noisy.
> 
>  PVE/Ceph/Tools.pm | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 


applied, thanks, one question still inline though.


> +	if (defined($current_properties->{$setting}) && $value eq $current_properties->{$setting}) {

hmm, might this cause trouble (or at least noisy warnings) with properties
that are defined as integers in the schema (if we even convert those, not
sure from top of my head) or is this always in string form here?

> +	    print "skipping '${setting}', did not change\n";
> +	    delete $param->{$setting};
> +	    next;
> +	}
> +
>  	print "pool $pool: applying $setting = $value\n";
>  	if (my $err = $set_pool_setting->($pool, $setting, $value, $rados)) {
>  	    print "$err";





More information about the pve-devel mailing list