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 8405B1FF13F for ; Thu, 18 Jun 2026 08:43:18 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 85169C0A0; Thu, 18 Jun 2026 08:43:16 +0200 (CEST) Date: Thu, 18 Jun 2026 08:42:39 +0200 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= Subject: Re: plugin reentrant? To: Anthony Galica , "pve-devel@lists.proxmox.com" References: In-Reply-To: MIME-Version: 1.0 User-Agent: astroid/0.17.0 (https://github.com/astroidmail/astroid) Message-Id: <1781764622.asu64jnlli.astroid@yuna.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1781764904340 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.054 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 Message-ID-Hash: UJNLMVPTKB662EKVACU72P6Q5FMXSTGO X-Message-ID-Hash: UJNLMVPTKB662EKVACU72P6Q5FMXSTGO X-MailFrom: f.gruenbichler@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On June 17, 2026 9:45 pm, Anthony Galica wrote: > Hi Everyone, >=20 > Is a proxmox plugin reentrant in that will it simultaneously send two or = more requests to the same instance of the running script? There can be more than one *process* calling into storage plugin perl code at the same time - API requests are processed concurrently, including long-running tasks executed in their own worker process, and CLI tools can also call into plugin code via PVE::Storage. For some code paths, there will be a mutual exclusion mechanism in effect via pmxcfs cluster-wide locking for shared storages, and node-local locking for local storages. Those mostly cover code paths related to allocating or freeing volumes. > Does the answer differ for the same storage pool vs. different storage po= ols? Currently, the locking done by PVE is per storage plugin instance (which is normally one pool/export/directory/.. ). We have discussed allowing storage plugins to mark themselves as not requiring such a coarse lock, in which case we would instead lock the (storage plugin instance, VMID) tuple - but that is not yet implemented. If you have different locking requirements, you can of course implement your own locking inside your plugin on top of what PVE does - but please be careful to not cause accidental deadlocks. Hope this helps - please reach out if you have more questions! Fabian P.s. if you are developing your own custom storage plugin, we'd be interested to know about it!