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 7BB21841A for ; Fri, 3 Mar 2023 13:07:25 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 54877DC97 for ; Fri, 3 Mar 2023 13:06:55 +0100 (CET) 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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 3 Mar 2023 13:06:54 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 1233146375; Fri, 3 Mar 2023 13:06:54 +0100 (CET) Message-ID: <3e15f154-8e08-e13c-e844-d445eee06940@proxmox.com> Date: Fri, 3 Mar 2023 13:06:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Proxmox VE development discussion , Matthieu Malvache References: <20230303111604.2043-1-matthieu@ma2t.com> <20230303111604.2043-2-matthieu@ma2t.com> From: Matthias Heiserer In-Reply-To: <20230303111604.2043-2-matthieu@ma2t.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.168 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.092 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 Subject: Re: [pve-devel] [PATCH container 1/1] vnc: Allow custom timeout value in vncproxy method 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: Fri, 03 Mar 2023 12:07:25 -0000 Hi, Did you already submit a CLA? https://pve.proxmox.com/wiki/Developer_Documentation#Software_License_and_Copyright I noticed two issues: This patch is not for pve-container, but rather qemu-server, so the subject should include [PATCH qemu-server] rather than [PATCH container] On 03.03.2023 12:16, Matthieu Malvache wrote: > This commit adds support for a custom timeout value in the 'vncproxy' > method of the Proxmox PVE REST API. The timeout can be specified using > the 'timeout' parameter and defaults to 10 seconds if not set. > > Signed-off-by: Matthieu Malvache > --- > PVE/API2/Qemu.pm | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm > index 587bb22..4ca5842 100644 > --- a/PVE/API2/Qemu.pm > +++ b/PVE/API2/Qemu.pm > @@ -2164,6 +2164,13 @@ __PACKAGE__->register_method({ > default => 0, > description => "Generates a random password to be used as ticket instead of the API ticket.", > }, > + timeout => { > + optional => 1, > + type => 'integer', > + minimum => 5, > + default => 10, > + description => "Timeout in seconds for the vnc proxy connection.", > + }, The indent here should be (\tab.... is a tab, \w.. are four spaces) \tab....\w..timeout \tab....\tab....optional => 1 so the difference in indents is always 4 spaces (1 tab = 8 spaces wide) > }, > }, > returns => { > @@ -2192,6 +2199,7 @@ __PACKAGE__->register_method({ > my $vmid = $param->{vmid}; > my $node = $param->{node}; > my $websocket = $param->{websocket}; > + my $timeout = $param->{timeout}; > > my $conf = PVE::QemuConfig->load_config($vmid, $node); # check if VM exists > > @@ -2226,8 +2234,6 @@ __PACKAGE__->register_method({ > > my $port = PVE::Tools::next_vnc_port($family); > > - my $timeout = 10; > - > my $realcmd = sub { > my $upid = shift; > Other than that, I'd say it looks fine.