From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id D5CC71FF17E for ; Thu, 27 Nov 2025 16:36:02 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E35D17CCD; Thu, 27 Nov 2025 16:36:21 +0100 (CET) From: Shannon Sterz To: pdm-devel@lists.proxmox.com Date: Thu, 27 Nov 2025 16:36:02 +0100 Message-ID: <20251127153609.440415-1-s.sterz@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1764257736814 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.085 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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: [pdm-devel] [PATCH datacenter-manager/yew-widget-toolkit 0/7] avoid more race conditions on log in X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" previously [1] a commit addressed an issue that could log out users right after they logged in again. this series tries to address several more races that could have the same effect. to achieve that all requests need to be aborted once a log out occurs. this should reduce the possibility that one of these requests ends up in a race with a log in request. if one of the requests addressed in this series runs with an invalid ticket in parallel to a login request and finishes after the login, the user will be kicked out again right after logging in. hence, all occurrences of `Scope::send_future()` are replaced with either AsyncAbortGuard or AsyncPool. AsyncAbortGuard is chosen when it's about a one of requests, whereas AsyncPool is more useful in cases where several (potentially parallel) requests may occur. these will abort any requests when they are dropped. so once the login panel is rendered an all other components are destroyed, the requests will be aborted. we also need to refactor the DatacenterManagerApp a little bit. it always gets rendered. so any requests it makes won't be dropped on log out as it always gets rendered. hence, manually abort all its request by: - aborting the Loader for running tasks - dropping its AsyncPool - not rendering the AclContext when logged out [1]: https://git.proxmox.com/?p=proxmox-datacenter-manager.git;a=commit;h=6a14f4571b0a8cf67949a13391671bba7c91c95b proxmox-yew-widget-toolkit: Shannon Sterz (1): loader: add helper to allow aborting a load src/state/loader.rs | 5 +++++ 1 file changed, 5 insertions(+) proxmox-datacenter-manager: Shannon Sterz (6): ui: main: abort running task load on log out ui: main: move requests into an async pool and drop it on logout ui: main: only render acl context when we are logged in ui: resource tree: use an async pool for requests ui: node status: handle the request via an AsyncAbortGuard ui: top nav bar: use an abort guard for loading the version ui/src/administration/node_status.rs | 20 ++++++++++---- ui/src/main.rs | 41 +++++++++++++++++++--------- ui/src/top_nav_bar.rs | 9 ++++-- ui/src/widget/resource_tree.rs | 6 +++- 4 files changed, 54 insertions(+), 22 deletions(-) Summary over all repositories: 5 files changed, 59 insertions(+), 22 deletions(-) -- Generated by git-murpp 0.8.1 _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel