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 5CE4090C16 for ; Fri, 23 Sep 2022 11:51:48 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 02F1722D49 for ; Fri, 23 Sep 2022 11:51:18 +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 for ; Fri, 23 Sep 2022 11:51:16 +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 6646444593 for ; Fri, 23 Sep 2022 11:51:16 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Fri, 23 Sep 2022 11:51:13 +0200 Message-Id: <20220923095115.1974215-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.071 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH qemu-server v4 0/2] qmeventd: improve shutdown behaviour 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, 23 Sep 2022 09:51:48 -0000 includes the following improvements: * increases 'force cleanup' timeout to 60s (from 5) * saves individual timeout for each vm * don't force cleanup for vms where normal cleanup worked * sending QMP quit instead of SIGTERM (less log noise) changes from v3: * merge CleanupData into Client (pidfd,timeout) and use that for the forced_cleanup list * close pidfd also in cleanup_client (and remove itself from the forced_cleanup list) * guard the sigkill with a check for timeout != 0 * with those changes patch 2/3 is not necessary anymore changes from v2: * change from cast of the function to cast of the parameters * don't copy the variable on the stack in 'sigkill' changes from v1: * remove 'alarm' calls altogether and use epoll_waits' timeout mechanic instead * call 'time()' only once and give it as user data to the function * change the function singatures and cast on callsite with '(GFunc)' for the g_slist_foreach calls * change to for the usage output for timeouts Dominik Csapak (2): qmeventd: rework 'forced_cleanup' handling and set timeout to 60s qmeventd: send QMP 'quit' command instead of SIGTERM qmeventd/qmeventd.c | 112 ++++++++++++++++++++++++-------------------- qmeventd/qmeventd.h | 8 ++-- 2 files changed, 65 insertions(+), 55 deletions(-) -- 2.30.2