From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 6FF7C1FF16B for ; Tue, 29 Jul 2025 13:16:36 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 58748EA80; Tue, 29 Jul 2025 13:16:36 +0200 (CEST) From: Wolfgang Bumiller To: pve-devel@lists.proxmox.com Date: Tue, 29 Jul 2025 13:15:13 +0200 Message-ID: <20250729111557.136012-1-w.bumiller@proxmox.com> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1753787748641 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.077 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 Subject: [pve-devel] [RFC storage 00/26+10+3] unify vtype and content-type and 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" This series is a first attempt at updating the storage API so that - vtype == content type - VM volumes have type "vm-vol" - Container volumes have type "ct-vol" - "images" is a generic "legacy" term which means "unknown OR vm-vol or ct-vol" - remaining openvz-related 'rootdir' parts are removed - rootdir is now intended to mean "unknown or ct-vol" There are several reasons for adding 2 new types, rather than making the old ones more strict: - The "rootdir" vs "images" distinction in `list_volumes` only happened if our code to check the actually existing guest type was used. This could not be enforced for external storage plugins and is a weird and surprising API quirk. - The "rootdir" *vtype* was otherwise *never* used as it referred to old openvz 'private/' subdirectories. - The container code allocated "images", not "rootdirs". - Since containers were allocated as type "images", the `content-dir` option for "rootdir" never had any effect. (You can now set content-dirs for types 'vm-vol' and 'ct-vol' which will be honored for any new disks allocated from the update pve-container and qemu-server code.) API Notes: - vtype parameters are added to several API methods - but they are optional - list_images now also includes a `vtype` in its return value, but only if it is NOT `images` (so legacy volumes are returned unchanged via the API). - old plugins should still function as they did previously but keep using the legacy "images" vtype/content-type Storage notes: Storages now need to be able to tell vm/ct volumes apart from "images", for which this not only introduced separate directories, but also adapts the volume id naming scheme. In order to *somewhat* void running into rogue `/^vm-/` regexes affecting new style volumes, the new prefixes are the reverse of the type names: `vol-vm-` and `vol-ct-`. For base images, the entire name is prefixed with `base-` instead of, like previously, doing `s/vm-/base-/`. Patch notes: Initially I did the vtype separately from the content type, but the series became a bit of a back & forth. This version is mostly split by functionality as it seemed nicer for reviews and might sort of work for external plugin writers as a guide. Therefore patches add vtype parameters without adapting all the callers. (This *should* mostly be fine since they are optional, though...) And Tests are only changed as a whole at the end. For qemu-server, most of the tests were updated via `sed`. _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel