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 A29341FF170 for ; Thu, 15 May 2025 11:17:43 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3D97F1E27E; Thu, 15 May 2025 11:18:05 +0200 (CEST) Date: Thu, 15 May 2025 11:16:43 +0200 (CEST) From: =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= To: Proxmox VE development discussion Message-ID: <1975340184.15398.1747300603697@webmail.proxmox.com> In-Reply-To: References: MIME-Version: 1.0 X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.6-Rev75 X-Originating-Client: open-xchange-appsuite 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_MISSING 0.1 Missing DMARC 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_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. [proxmox.com] Subject: Re: [pve-devel] checking output of storage plugin API - volume_rollback_is_possible(..., blockers) X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" > Andrei Perapiolkin via pve-devel hat am 14.05.2025 14:44 CEST geschrieben: > Hi, > > I'm trying to test specific aspects of the storage plugin API, > and I'm not sure how to verify whether my function > volume_rollback_is_possible > correctly sets up the blockers list. > > I've checked REST API documentation: > https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback > > CLI tool: > qm rollback > > But I couldn't find where the list of blockers is returned or printed. the $blockers parameter is currently only passed in replication contexts: https://git.proxmox.com/?p=pve-guest-common.git;a=blob;f=src/PVE/AbstractConfig.pm;h=3d4fcbbf98553b1f4edc8f59307daae1cf1b8a2f;hb=HEAD#l1051 the expected behaviour is to - fill $blockers with the snapshot names preventing the rollback, if there are any - to die with an error message if rollback is not possible the caller can then decide if they want to pass a $blockers reference, and upon catching the error, inspect it to give a nicer error message. you can see how the 'zfs' plugin handles it (the only one supporting replication at the moment): https://git.proxmox.com/?p=pve-storage.git;a=blob;f=src/PVE/Storage/ZFSPoolPlugin.pm;h=26fb0a4237e5c1013ebfa85ca2cc072c57d2c36f;hb=HEAD#l502 and model your implementation after its behaviour (of course, whether rolling back is limited to the most recent snapshot like it is with ZFS is up to you and your storage ;)) > Are there any posts, guides, or documentation on how to test blockers or > other return values from storage plugins? out of interest - is your plugin publicly available? _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel