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 D51371FF37F for ; Wed, 17 Apr 2024 13:54:58 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 54DD94187; Wed, 17 Apr 2024 13:54:57 +0200 (CEST) Message-ID: <77f78419-1a19-44e8-ade2-3b2210bf94b6@proxmox.com> Date: Wed, 17 Apr 2024 13:54:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion , Dominik Csapak References: <20240416131909.2867605-1-d.csapak@proxmox.com> <20240416131909.2867605-7-d.csapak@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20240416131909.2867605-7-d.csapak@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.070 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 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. [ovf.pm] Subject: Re: [pve-devel] [PATCH storage 6/9] ovf: implement rudimentary boot order 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" Am 16.04.24 um 15:18 schrieb Dominik Csapak: > simply add all parsed disks to the boot order in the order we encounter > them (similar to the esxi plugin). > > Signed-off-by: Dominik Csapak > --- > src/PVE/Storage/OVF.pm | 6 ++++++ > src/test/run_ovf_tests.pl | 3 +++ > 2 files changed, 9 insertions(+) > > diff --git a/src/PVE/Storage/OVF.pm b/src/PVE/Storage/OVF.pm > index f56c34d..f438de2 100644 > --- a/src/PVE/Storage/OVF.pm > +++ b/src/PVE/Storage/OVF.pm > @@ -245,6 +245,8 @@ sub parse_ovf { > # when all the nodes has been found out, we copy the relevant information to > # a $pve_disk hash ref, which we push to @disks; > > + my $boot = []; Nit: might be better to name it more verbosely since it's a long function, e.g. boot_order, boot_disk_keys, or similar > + > foreach my $item_node (@disk_items) { > > my $disk_node; > @@ -348,6 +350,10 @@ ovf:Item[rasd:InstanceID='%s']/rasd:ResourceType", $controller_id); > }; > $pve_disk->{virtual_size} = $virtual_size if defined($virtual_size); > push @disks, $pve_disk; > + push @$boot, $pve_disk_address; > + } This bracket should not be here and the next line below the next bracket (fixed by the next patch). > + > + $qm->{boot} = "order=" . join(';', @$boot); Won't this fail later if there are no disks? _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel