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) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 6D3A661D7F for ; Thu, 22 Oct 2020 18:45:55 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5B9E421CE6 for ; Thu, 22 Oct 2020 18:45:25 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 4950921CDB for ; Thu, 22 Oct 2020 18:45:24 +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 1B62E44990 for ; Thu, 22 Oct 2020 18:45:24 +0200 (CEST) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Date: Thu, 22 Oct 2020 18:45:18 +0200 Message-Id: <20201022164518.4658-1-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.125 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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] applied: [PATCH manager] ui: boot order: handle cloudinit correctly 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: Thu, 22 Oct 2020 16:45:55 -0000 heuristically.. Signed-off-by: Thomas Lamprecht --- and it's biting us once again to handle the cloudinit temp build like a cdrom drive... www/manager6/qemu/BootOrderEdit.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/manager6/qemu/BootOrderEdit.js b/www/manager6/qemu/BootOrderEdit.js index 11048896..1e924dea 100644 --- a/www/manager6/qemu/BootOrderEdit.js +++ b/www/manager6/qemu/BootOrderEdit.js @@ -19,12 +19,14 @@ Ext.define('PVE.qemu.BootOrderPanel', { xclass: 'Ext.app.ViewController', }, + isCloudinit: (v) => v.match(/media=cdrom/) && v.match(/[:/]vm-\d+-cloudinit/), + isDisk: function(value) { return PVE.Utils.bus_match.test(value); }, isBootdev: function(dev, value) { - return this.isDisk(dev) || + return (this.isDisk(dev) && !this.isCloudinit(value)) || (/^net\d+/).test(dev) || (/^hostpci\d+/).test(dev) || ((/^usb\d+/).test(dev) && !(/spice/).test(value)); @@ -59,7 +61,7 @@ Ext.define('PVE.qemu.BootOrderPanel', { } } else if (orderList[i] === 'd') { Ext.Object.each(me.vmconfig, function(key, value) { - if (me.isDisk(key) && (/media=cdrom/).test(value)) { + if (me.isDisk(key) && value.match(/media=cdrom/) && !me.isCloudinit(value)) { list.push(key); } }); -- 2.20.1