From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 51F0D942AC for ; Wed, 10 Apr 2024 13:17:51 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 33399DE6F for ; Wed, 10 Apr 2024 13:17:51 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 10 Apr 2024 13:17:50 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 39ABF43C9A for ; Wed, 10 Apr 2024 13:17:50 +0200 (CEST) From: Hannes Duerr To: pve-devel@lists.proxmox.com Date: Wed, 10 Apr 2024 13:17:29 +0200 Message-Id: <20240410111730.189254-1-h.duerr@proxmox.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.036 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 Subject: [pve-devel] [PATCH qemu-server v2 1/2] fix #5363: cloudinit: make creation of scsi cloudinit discs possible again 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: , X-List-Received-Date: Wed, 10 Apr 2024 11:17:51 -0000 Upon obtaining the device type, a check is performed to determine if it is a CD drive. It is important to note that Cloudinit drives are always assigned as CD drives. If the drive has not yet been allocated, the test will fail due to the unset cd attribute. To avoid this, an explicit check is now performed to determine if it is a Cloudinit drive that has not yet been assigned. The mentioned error was introduced by this patch: https://lists.proxmox.com/pipermail/pve-devel/2024-January/061311.html Signed-off-by: Hannes Duerr --- Changes since v1: - fixed rephrased commit message - added reference to the commit which introduced the bug PVE/QemuServer/Drive.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm index 34c6e87..c829bde 100644 --- a/PVE/QemuServer/Drive.pm +++ b/PVE/QemuServer/Drive.pm @@ -853,7 +853,7 @@ sub get_scsi_devicetype { my $devicetype = 'hd'; my $path = ''; - if (drive_is_cdrom($drive)) { + if (drive_is_cdrom($drive) || drive_is_cloudinit($drive)) { $devicetype = 'cd'; } else { if ($drive->{file} =~ m|^/|) { -- 2.39.2