From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id 513831FF165
	for <inbox@lore.proxmox.com>; Wed, 26 Mar 2025 04:59:15 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 0C7A31C8FC;
	Wed, 26 Mar 2025 04:59:10 +0100 (CET)
Date: Wed, 26 Mar 2025 16:50:40 +1300
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
References: <mailman.62.1731030290.372.pve-devel@lists.proxmox.com>
 <mailman.70.1731030453.372.pve-devel@lists.proxmox.com>
 <2141979428.9131.1737980187761@webmail.proxmox.com>
In-Reply-To: <2141979428.9131.1737980187761@webmail.proxmox.com>
MIME-Version: 1.0
Message-ID: <mailman.194.1742961549.359.pve-devel@lists.proxmox.com>
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Post: <mailto:pve-devel@lists.proxmox.com>
From: Severen Redwood via pve-devel <pve-devel@lists.proxmox.com>
Precedence: list
Cc: Severen Redwood <severen.redwood@sitehost.co.nz>,
 Thomas Lamprecht <t.lamprecht@proxmox.com>
X-Mailman-Version: 2.1.29
X-BeenThere: pve-devel@lists.proxmox.com
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
Subject: Re: [pve-devel] [PATCH manager v4 1/2] close #4369: api: optionally
 only suggest unique IDs
Content-Type: multipart/mixed; boundary="===============6891929651572296901=="
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

--===============6891929651572296901==
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <severen.redwood@sitehost.co.nz>
X-Original-To: pve-devel@lists.proxmox.com
Delivered-To: pve-devel@lists.proxmox.com
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by lists.proxmox.com (Postfix) with ESMTPS id CF545CA7E5
	for <pve-devel@lists.proxmox.com>; Wed, 26 Mar 2025 04:59:08 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id B87BB1C8DE
	for <pve-devel@lists.proxmox.com>; Wed, 26 Mar 2025 04:59:08 +0100 (CET)
Received: from mx3.ext.sitehost.co.nz (mx3.ext.sitehost.co.nz [120.138.20.239])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by firstgate.proxmox.com (Proxmox) with ESMTPS
	for <pve-devel@lists.proxmox.com>; Wed, 26 Mar 2025 04:59:07 +0100 (CET)
Received: from localhost (extmx1-new.vps.sitehost.co.nz [127.0.0.1])
	by mx3.ext.sitehost.co.nz (Postfix) with ESMTP id E500218073E;
	Wed, 26 Mar 2025 16:50:48 +1300 (NZDT)
X-Virus-Scanned: SiteHost Virus/Spam Prevention on mx3.ext.sitehost.co.nz
X-Spam-Flag: NO
X-Spam-Score: -3.45
X-Spam-Status: No, score=-3.45 tagged_above=-100 required=5
	tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, RP_MATCHES_RCVD=-0.55]
	autolearn=ham autolearn_force=no
Received: from mx3.ext.sitehost.co.nz ([127.0.0.1])
	by localhost (mx3.ext.sitehost.co.nz [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id nIe6dSkWEYcx; Wed, 26 Mar 2025 16:50:45 +1300 (NZDT)
Received: from [192.168.99.182] (oep.nct.sitehost.co.nz [120.138.23.30])
	by mx3.ext.sitehost.co.nz (Postfix) with ESMTPSA id 78D2D180CDD;
	Wed, 26 Mar 2025 16:50:40 +1300 (NZDT)
Message-ID: <e20ee17b-8109-465e-b693-eebd37e17b46@sitehost.co.nz>
Date: Wed, 26 Mar 2025 16:50:40 +1300
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [pve-devel] [PATCH manager v4 1/2] close #4369: api: optionally
 only suggest unique IDs
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
References: <mailman.62.1731030290.372.pve-devel@lists.proxmox.com>
 <mailman.70.1731030453.372.pve-devel@lists.proxmox.com>
 <2141979428.9131.1737980187761@webmail.proxmox.com>
Content-Language: en-NZ
From: Severen Redwood <severen.redwood@sitehost.co.nz>
Cc: =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>,
 Thomas Lamprecht <t.lamprecht@proxmox.com>
In-Reply-To: <2141979428.9131.1737980187761@webmail.proxmox.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
	AWL                     0.046 Adjusted score from AWL reputation of From: address
	BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
	DMARC_PASS               -0.1 DMARC pass policy
	KAM_DMARC_STATUS         0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
	SPF_HELO_PASS          -0.001 SPF: HELO matches SPF record
	SPF_PASS               -0.001 SPF: sender matches SPF record

On 28/01/2025 01:16, Fabian Grünbichler wrote:
> Hi!
> 
> sorry it took so long to get back at this series! next will be faster :)

No worries! As you can see it took me a while to get back to this too... I've implemented all the suggestions around style and will post the updated patches soon.

> this doesn't work in pve-manager, since you want to use/call this module in pve-container/qemu-server and would end up having a circular dependency. it could either move to pve-cluster, or to pve-guest-common (the latter would be my preference, since it is guest-specific).

Thanks for catching this! I've moved it to a separate commit for pve-guest-common.

> alternatively, we could also not expand the ranges when parsing, not sure whether that would make things easier or more complicated though..

I tried that at one point, but found it greatly complicated the code for minimal gain considering that using a hash map should be fast enough in practice. For example, 100,000 recorded IDs are handled with no perceivable difference in performance compared to an empty ID list.



--===============6891929651572296901==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============6891929651572296901==--