From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 672801FF16B for ; Mon, 30 Sep 2024 03:59:30 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 63078DEEE; Mon, 30 Sep 2024 03:59:47 +0200 (CEST) Date: Mon, 30 Sep 2024 14:58:51 +1300 To: Proxmox VE development discussion , Alexandre Derumier References: <20240926135516.117065-1-severen.redwood@sitehost.co.nz> <672969498.5401.1727364860595@webmail.proxmox.com> In-Reply-To: MIME-Version: 1.0 Message-ID: List-Id: Proxmox VE development discussion List-Post: From: Severen Redwood via pve-devel Precedence: list Cc: Severen Redwood X-Mailman-Version: 2.1.29 X-BeenThere: pve-devel@lists.proxmox.com List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Proxmox VE development discussion List-Help: Subject: Re: [pve-devel] [PATCH manager 1/2] close #4369: api: optionally only suggest unique IDs Content-Type: multipart/mixed; boundary="===============6827478155366061138==" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" --===============6827478155366061138== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: 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 C8310C1B12 for ; Mon, 30 Sep 2024 03:59:45 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A1247DED5 for ; Mon, 30 Sep 2024 03:59:15 +0200 (CEST) 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 ; Mon, 30 Sep 2024 03:59:14 +0200 (CEST) Received: from localhost (extmx1-new.vps.sitehost.co.nz [127.0.0.1]) by mx3.ext.sitehost.co.nz (Postfix) with ESMTP id C9647180580; Mon, 30 Sep 2024 14:59:10 +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 6uRnZgZmEtnt; Mon, 30 Sep 2024 14:59:06 +1300 (NZDT) Received: from yggdrasill (oep.nct.sitehost.co.nz [120.138.23.30]) by mx3.ext.sitehost.co.nz (Postfix) with ESMTPSA id B44C4180BD2; Mon, 30 Sep 2024 14:59:04 +1300 (NZDT) Date: Mon, 30 Sep 2024 14:58:51 +1300 From: Severen Redwood To: Proxmox VE development discussion , Alexandre Derumier Subject: Re: [pve-devel] [PATCH manager 1/2] close #4369: api: optionally only suggest unique IDs Message-ID: References: <20240926135516.117065-1-severen.redwood@sitehost.co.nz> <672969498.5401.1727364860595@webmail.proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SPAM-LEVEL: Spam detection results: 0 AWL 0.178 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_PASS -0.001 SPF: HELO matches SPF record SPF_PASS -0.001 SPF: sender matches SPF record On Sun, Sep 29, 2024 at 01:47:31PM GMT, DERUMIER, Alexandre via pve-devel wrote: > Couldn't we simply move the deleted vm config file > to a trash/tombstone directory ? > > /etc/pve/.deleted/.conf ? > > > (I could be great to be able to mass delete vms in // without having a > big lock on a file) This is an interesting idea, though I think creating an empty file is probably better than moving the config as that would only store information that will never be needed again. Needing to acquire a lock on the list when deleting multiple VMs may be a bottleneck, but I'm not entirely convinced it would actually be a problem in practice. How many VMs do you expect to be deleting all at once? And how often? This approach would also use more storage as you now have the overhead of FS metadata for every single ID you have marked as used. Dietmar, what do you think is the best option here? I'm personally leaning towards using the list with your run-length encoding suggestion, but I'm open to implementing Alexandre's idea if you think it's worth it. --===============6827478155366061138== 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 --===============6827478155366061138==--