From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] applied: [PATCH manager] ui: boot order: handle cloudinit correctly
Date: Thu, 22 Oct 2020 18:45:18 +0200 [thread overview]
Message-ID: <20201022164518.4658-1-t.lamprecht@proxmox.com> (raw)
heuristically..
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
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
reply other threads:[~2020-10-22 16:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201022164518.4658-1-t.lamprecht@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox