public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Aaron Lauterer <a.lauterer@proxmox.com>
Subject: [pve-devel] applied: [PATCH manager] fix #5010: ceph: pool set only changed properties
Date: Mon, 22 Jul 2024 19:02:43 +0200	[thread overview]
Message-ID: <6fe6ba3b-fc25-4d5d-bb4f-6943a62a5947@proxmox.com> (raw)
In-Reply-To: <20240709114116.208276-1-a.lauterer@proxmox.com>

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



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


  parent reply	other threads:[~2024-07-22 17:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 11:41 [pve-devel] " Aaron Lauterer
2024-07-10 12:10 ` Christoph Heiss
2024-07-22 17:02 ` Thomas Lamprecht [this message]
2024-07-23  7:50   ` [pve-devel] applied: " Aaron Lauterer
2024-07-23  7:54     ` Thomas Lamprecht

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=6fe6ba3b-fc25-4d5d-bb4f-6943a62a5947@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=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 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