From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 0F2BE1FF187 for <inbox@lore.proxmox.com>; Wed, 7 May 2025 10:40:54 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9DB7736B08; Wed, 7 May 2025 10:41:09 +0200 (CEST) Date: Wed, 7 May 2025 10:41:05 +0200 (CEST) From: =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com> To: Fiona Ebner <f.ebner@proxmox.com>, Proxmox VE development discussion <pve-devel@lists.proxmox.com> Message-ID: <991620029.10997.1746607265936@webmail.proxmox.com> In-Reply-To: <38bad46d-cba2-4afe-8f82-eee8aa80c9a1@proxmox.com> References: <20250422115141.808427-1-alexandre.derumier@groupe-cyllene.com> <mailman.47.1745322774.394.pve-devel@lists.proxmox.com> <38bad46d-cba2-4afe-8f82-eee8aa80c9a1@proxmox.com> 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. [plugin.pm] Subject: Re: [pve-devel] [PATCH qemu-server 02/14] blockdev: cmdline: convert drive to blockdev syntax X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> > Fiona Ebner <f.ebner@proxmox.com> hat am 06.05.2025 14:57 CEST geschrieben: > > + > > + ($storeid) = PVE::Storage::parse_volume_id($volid, 1); > > + my $vtype = $storeid ? (PVE::Storage::parse_volname($storecfg, $drive->{file}))[0] : undef; > > + die "$driveid: explicit media parameter is required for iso images\n" > > + if !defined($drive->{media}) && defined($vtype) && $vtype eq 'iso'; > > + > > + if (drive_is_cdrom($drive)) { > > + $path = get_iso_path($storecfg, $volid); > > + } elsif ($storeid) { > > + $path = PVE::Storage::path($storecfg, $volid, $snap); > > + $scfg = PVE::Storage::storage_config($storecfg, $storeid); > > + } > > + } > > + > > + if ($path =~ m/^rbd:(\S+)$/) { > > + > > + my $rbd_options = $1; > > + $blockdev->{driver} = 'rbd'; > > + > > + #map options to key=value pair (if not key is provided, this is the image) > > + #options are seprated with : but we need to exclude \: used for ipv6 address > > + my $options = { > > + map { > > + s/\\:/:/g; /^(.*?)=(.*)/ ? ($1=>$2) : (image=>$_) > > + } $rbd_options =~ /(?:\\:|\[[^\]]*\]|[^:\\])+/g > > + }; > > Maybe we should add a new method to the storage plugin API to give us a > hash with the necessary QEMU blockdev options? Because right now, we > construct an implicit QEMU-path just to deconstruct it again, which is > not nice at all. We can implement that for all our plugins and, for > backwards-compatibility handling with third-party plugins, the default > implementation in Plugin.pm could have the code you put here. something like that sounds okay to me.. > Just not sure if the RBD plugin should put the generated ceph config in > /run/qemu-server/${storeid}.ceph.conf then, or use some kind of > /run/pve-storage path? the latter seems like a better fit if the storage plugin generates the file.. > CC @Fabian, opinions? do we need both? or could a per-volume config file also replace the hash? _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel