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 035661FF140 for ; Fri, 24 Apr 2026 08:57:01 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0BE67992F; Fri, 24 Apr 2026 08:56:57 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 24 Apr 2026 08:56:20 +0200 Message-Id: Subject: Re: [PATCH pve-storage 7/7] api: add /nodes//storage//identity route From: "Lukas Wagner" To: "Thomas Lamprecht" , , X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20260415115817.348947-1-l.wagner@proxmox.com> <20260415115817.348947-8-l.wagner@proxmox.com> <262d3355-b8ec-470c-8fed-32a7b151fee4@proxmox.com> <231a34ce-06cb-40b7-b0d8-6238e368e60c@proxmox.com> <85e5c377-ab04-407a-9670-7552591791f1@proxmox.com> <4cf9b5ee-5a27-4bf1-a32f-645660b0b58a@proxmox.com> <6c51c1d2-76ca-45a5-9356-097bcaccf1cb@proxmox.com> In-Reply-To: <6c51c1d2-76ca-45a5-9356-097bcaccf1cb@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1777013690786 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.004 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 POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [store.com] Message-ID-Hash: TV2LGZCNVHUQ6LVQ4AXQYDBTOYIS7NPW X-Message-ID-Hash: TV2LGZCNVHUQ6LVQ4AXQYDBTOYIS7NPW X-MailFrom: l.wagner@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 Fri Apr 24, 2026 at 1:05 AM CEST, Thomas Lamprecht wrote: > Am 23.04.26 um 11:24 schrieb Lukas Wagner: >> One last point, but maybe I'm overthinking this: >>=20 >> To me, the { type: "", id: "> this ID would uniquely identify the PBS instance *as well as* the >> datastore/namespace, which it does not at the moment. >>=20 >> Would you think that it would make sense for PBS storage plugin to >> maybe combine the datastore, namespace and the >> pbs-instance-id into a single identifier here? >>=20 >> Maybe something like, in pseudo-regex >>=20 >> (/)?@ >>=20 >> e.g. store/some/name/space@dade89fe26104bc3858ae719c23594a7 >>=20 >> This would then actually uniquely identify the PBS storage (as in, two >> storages with the same ID should always point to the same content), >> while still allowing PDM to parse the identifier to retrieve the >> pbs-instance-id, if needed. > > Fair point but I'd keep `id` scoped to the server instance though, > because: > > - The pve-storage entry already pins datastore + namespace via > storage.cfg, so a caller that knows which pve-storage it queried has > those two from local context. Callers doing content-level matching > anyway start from a specific (datastore, namespace) target, so once > the instance ids line up the rest just falls out of the storage (or > e.g. PBS remote) config. Baking datastore + namespace into `id` mostly > duplicates what the caller already has and I'm not really a of such > packed strings (reminds me of PBS' backup repo syntax I recently split > up for better UX, albeit here it at least wouldn't be handled by the > user directly) > - Content-location identity as a general plugin contract is also > awkward: not every storage type decomposes into a "server + container > + sub-path" shape. > > So the contract should IMO rather stay "`id` identifies the server/servic= e > instance", which matches PDM's verification use. If auxiliary fields turn > out to be useful later, `{ type, id, ... }` extends additively without > breaking anyone, and I'd have nothing against adding datastore and > namespace as extra (nested) fields there if you strongly prefer that and > it really helps, but I would prefer to not "cram" it in the (instance) id= . Ack, then I'll just use the instance-id there. Thanks! I'll post the new version ASAP :)