all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pve-devel] [PATCH manager] api: workaround non-working 'maxworkers' alias in bulk actions api calls
Date: Fri, 5 Dec 2025 10:57:23 +0100	[thread overview]
Message-ID: <d66eeb71-2978-4774-85a0-9117b634e987@proxmox.com> (raw)
In-Reply-To: <20251205091539.783566-1-d.csapak@proxmox.com>

Lot's of "work" in the commit title :P

Am 05.12.25 um 10:15 AM schrieb Dominik Csapak:
> It seems, that 'alias' schema does not properly work currently for
> normal schema definitions (only for property-string), since it does not

Missing "do" here

> verification of the actual schema (verified by calling the api with

Nit: s/verfified/checked/ sounds a bit nicer to avoid re-using "verify" ;)

> maxworkers=1000, which throws no errors). Luckily, this is the only use
> as api parameters that I could find, and here it did not do anything,

Nit: s/only use as/only use of 'alias' for/

Well, the "not do anything" is rather bad for the node-specific one,
which existed for longer, where it breaks existing API users.

> since we did not actually use `$param->{maxworkers}` anymore.
>
> In the long term, we should fix it in JSONSchema, but as a stop-gap,
> restore the old 'maxworkers' parameters to a 'real' property and mark it
> deprecated.
> 
> Also actually use it in the code and fix the error message to the new
> variant.
> 
> Reported in the forums for the node-specific one (since there the gui
> uses still the old variant):
> https://forum.proxmox.com/threads/bulk-migrate-error-in-9-1-2.177326/
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>

With the issue mentioned below fixed:

Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>

> diff --git a/PVE/API2/Cluster/BulkAction/Guest.pm b/PVE/API2/Cluster/BulkAction/Guest.pm
> index 3a53ca60..9ed7dbb6 100644
> --- a/PVE/API2/Cluster/BulkAction/Guest.pm
> +++ b/PVE/API2/Cluster/BulkAction/Guest.pm
> @@ -704,7 +723,13 @@ __PACKAGE__->register_method({
>                  optional => 1,
>              },
>              maxworkers => {
> -                alias => 'max-workers',
> +                description => "Defines the maximum number of tasks running concurrently."
> +                    . " Deprecated, use 'max-workers' instead.",
> +                optional => 1,
> +                default => 4,
> +                type => 'integer',
> +                minimum => 1,
> +                maximum => 64,
>              },
>              'max-workers' => {
>                  description => "Defines the maximum number of tasks running concurrently.",

For the migrate one here, the default for 'max-workers' is 1, not 4


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


  reply	other threads:[~2025-12-05  9:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05  9:14 Dominik Csapak
2025-12-05  9:57 ` Fiona Ebner [this message]
2025-12-05  9:59   ` Dominik Csapak
2025-12-05 10:04 ` [pve-devel] superseded: " Dominik Csapak

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=d66eeb71-2978-4774-85a0-9117b634e987@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=d.csapak@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal