From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id A203E1FF0DE for ; Thu, 19 Nov 2026 13:32:20 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 232AA21662; Thu, 19 Nov 2026 13:32:20 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 19 Nov 2026 13:32:15 +0100 Message-Id: Subject: Re: [PATCH manager v4 29/41] api: cluster status: add cluster ID From: "Lukas Wagner" To: "Thomas Lamprecht" , X-Mailer: aerc 0.22.0-0-gc2f86b7abde3 References: <20261119103551.1666964-1-t.lamprecht@proxmox.com> <20261119103551.1666964-30-t.lamprecht@proxmox.com> In-Reply-To: <20261119103551.1666964-30-t.lamprecht@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795091536098 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.037 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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: Q35GHZWRMYNPHZEOFL5STQC2K2LAJ6SW X-Message-ID-Hash: Q35GHZWRMYNPHZEOFL5STQC2K2LAJ6SW 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 Thu Nov 19, 2026 at 11:34 AM CET, Thomas Lamprecht wrote: > Tools need an identifier of the cluster next to the guest uid, to tell > apart guests with the same uid in different clusters. Cluster names are > chosen freely and standalone nodes have none, and the existing 'id' > fields only identify entries within the response. > > Return the ID that pmxcfs generates as 'cluster-id' on the cluster > entry, or on the node entry for a standalone node. Omit it while no ID > exists, for example as long as the cluster member with the lowest node > ID runs an older version. Mostly thinking out aloud here, I have not done deep research on the actual need or viability, but I've wondered, from a PDM perspective, whether it could make sense to return the cluster id in *all* HTTP API calls as some sort of metadata field, either as a HTTP header, or as a 'sidecar' data field using the same mechansim as 'digest'. I can imagine quite a few cases in PDM where we'd ideally always want a reliable unique ID readily available, e.g. as a key for a local cache. Always having to call the status API first to get the ID could be quite annyoing over time. If we connect to the remote anyway, and lookup of the cluster-id is cheap on the PVE side (which it should be), then we might as well just return it in the response unconditionally. > > Reading the ID requires Sys.Audit on '/', like the rest of this > endpoint, while the guest uid and rtime in /cluster/resources only need > VM.Audit on the guest. The ID is not a secret; restricting it to this > endpoint is a cautious start, as access is easier to widen than to take > back. Exposing it to less privileged users remains an option, to be > weighed carefully, if a use case needs it. My idea would of course entail that the cluster-id is accessible to all authenticated API requests, regardless of the permission levels. If that is a deal-breaker, this is course not possible. Anyways, it is not really important for the current series, since it can always be added later; the header/sidecare field would not replace the field being returned in the cluster status API.