From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 49DCC1FF1A6 for ; Fri, 5 Dec 2025 10:58:45 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C3A6A12AF8; Fri, 5 Dec 2025 10:59:12 +0100 (CET) Message-ID: <4f3c1314-868b-4214-b714-bd87bd083f6f@proxmox.com> Date: Fri, 5 Dec 2025 10:59:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta To: Fiona Ebner , Proxmox VE development discussion References: <20251205091539.783566-1-d.csapak@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1764928701568 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.030 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH manager] api: workaround non-working 'maxworkers' alias in bulk actions api calls X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On 12/5/25 10:56 AM, Fiona Ebner wrote: > 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 > > With the issue mentioned below fixed: > > Reviewed-by: Fiona Ebner > >> 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 oops yeah, just copy/pasted from the wrong place v2 incoming ;) _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel