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 AC71871A9F for ; Tue, 5 Oct 2021 07:23:15 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9D40C2338E for ; Tue, 5 Oct 2021 07:23:15 +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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 7CA3E2337E for ; Tue, 5 Oct 2021 07:23:14 +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 0E86C45557; Tue, 5 Oct 2021 07:23:08 +0200 (CEST) Message-ID: <3108d8c2-2f35-7b4d-337d-22a297ee7086@proxmox.com> Date: Tue, 5 Oct 2021 07:21:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Thunderbird/93.0 Content-Language: en-US To: Proxmox VE development discussion , Alexandre Derumier References: <20210903063600.584505-1-aderumier@odiso.com> From: Thomas Lamprecht In-Reply-To: <20210903063600.584505-1-aderumier@odiso.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.227 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [qemuserver.pm] Subject: Re: [pve-devel] [PATCH qemu-server] qemu-agent: allow hotplug of fstrim_cloned_disk option. 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: Tue, 05 Oct 2021 05:23:15 -0000 On 03.09.21 08:36, Alexandre Derumier wrote: > This option don't have any impact on device itself. > > Signed-off-by: Alexandre Derumier > --- > PVE/QemuServer.pm | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm > index cc73af8..09701e0 100644 > --- a/PVE/QemuServer.pm > +++ b/PVE/QemuServer.pm > @@ -4743,6 +4743,8 @@ sub vmconfig_hotplug_pending { > } elsif ($opt eq 'cpulimit') { > my $cpulimit = $conf->{pending}->{$opt} == 0 ? -1 : int($conf->{pending}->{$opt} * 100000); > $cgroup->change_cpu_quota($cpulimit, 100000); > + } elsif ($opt eq 'agent') { > + vmconfig_update_agent($conf, $opt, $value); > } else { > die "skip\n"; # skip non-hot-pluggable options > } > @@ -4902,6 +4904,23 @@ sub vmconfig_update_net { > } > } > > +sub vmconfig_update_agent { > + my ($conf, $opt, $value) = @_; > + > + if ($conf->{$opt} && (my $old_agent = parse_guest_agent($conf))) { > + > + my $agent = parse_guest_agent({$opt => $value}); > + > + # skip non hotpluggable value > + if (safe_string_ne($agent->{enabled}, $old_agent->{enabled}) || > + safe_string_ne($agent->{type}, $old_agent->{type})) { > + die "skip\n"; > + } > + } > + die "skip\n"; but this method always skips no matter what? > + > +} > + > sub vmconfig_update_disk { > my ($storecfg, $conf, $hotplug, $vmid, $opt, $value, $arch, $machine_type) = @_; > >