[pve-devel] [PATCH v5 qemu-server 2/2] fix #3890 - GUI: warn for unlikely iothread config

Matthias Heiserer m.heiserer at proxmox.com
Mon Jun 13 15:54:25 CEST 2022


Previously, only a plaintext line in the task log showed something was off.
Now, the GUI will show it as a warning.

Reviewed-by: Fabian Ebner <f.ebner at proxmox.com>
Signed-off-by: Matthias Heiserer <m.heiserer at proxmox.com>
---

changes from v4:
* reorder import alphabetically

Changes from v3:
* None

changes from v2:
* locally import PVE::RestEnv log_warn


 PVE/QemuServer.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index e9aa248..aebfee8 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -36,6 +36,7 @@ use PVE::INotify;
 use PVE::JSONSchema qw(get_standard_option parse_property_string);
 use PVE::ProcFSTools;
 use PVE::PBSClient;
+use PVE::RESTEnvironment qw(log_warn);
 use PVE::RPCEnvironment;
 use PVE::Storage;
 use PVE::SysFSTools;
@@ -3961,7 +3962,9 @@ sub config_to_command {
 		$iothread .= ",iothread=iothread-$controller_prefix$controller";
 		push @$cmd, '-object', "iothread,id=iothread-$controller_prefix$controller";
 	    } elsif ($drive->{iothread}) {
-		warn "iothread is only valid with virtio disk or virtio-scsi-single controller, ignoring\n";
+		log_warn(
+		    "iothread is only valid with virtio disk or virtio-scsi-single controller, ignoring\n"
+		);
 	    }
 
 	    my $queues = '';
-- 
2.30.2






More information about the pve-devel mailing list