[pve-devel] [PATCH v3 qemu-server 2/2] Warn in GUI for unlikely iothread config - fixes #3890

Matthias Heiserer m.heiserer at proxmox.com
Thu May 12 11:24:16 CEST 2022


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


Signed-off-by: Matthias Heiserer <m.heiserer at proxmox.com>
---

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

No changes from v1

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

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index e0fc36e..408133e 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -41,6 +41,7 @@ use PVE::Storage;
 use PVE::SysFSTools;
 use PVE::Systemd;
 use PVE::Tools qw(run_command file_read_firstline file_get_contents dir_glob_foreach get_host_arch $IPV6RE);
+use PVE::RESTEnvironment qw(log_warn);
 
 use PVE::QMPClient;
 use PVE::QemuConfig;
@@ -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