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 72A031FF15E for ; Tue, 20 Jan 2026 11:37:44 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C9389B3F9; Tue, 20 Jan 2026 11:37:54 +0100 (CET) Mime-Version: 1.0 Date: Tue, 20 Jan 2026 11:37:21 +0100 Message-Id: From: "Daniel Kral" To: "Fiona Ebner" , "Proxmox VE development discussion" X-Mailer: aerc 0.21.0-38-g7088c3642f2c-dirty References: <20251215155334.476984-1-d.kral@proxmox.com> <20251215155334.476984-7-d.kral@proxmox.com> <673bbd53-e8af-4f60-bec9-e43871950261@proxmox.com> <97862bcf-38f4-49d7-b0aa-c31293343386@proxmox.com> In-Reply-To: <97862bcf-38f4-49d7-b0aa-c31293343386@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1768905386848 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.016 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. 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 ha-manager 6/9] config, manager: factor out resource motion info logic 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: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On Tue Jan 20, 2026 at 10:35 AM CET, Fiona Ebner wrote: > Am 20.01.26 um 10:25 AM schrieb Daniel Kral: >> Oh wait, just noticed that this would create a circular dependency, >> because get_resource_motion_info(...) uses get_affinitive_resources(...) >> from PVE::HA::Rules::ResourceAffinity, and >> PVE::HA::Rules::ResourceAffinity in turn uses PVE::HA::Rules::Helpers >> again.. >> >> I'd tend to let get_resource_motion_info(...) stay in PVE::HA::Helpers, >> or do you have other ideas? > > Okay, so get_resource_motion_info() depends on: > PVE::HA::Rules::NodeAffinity > PVE::HA::Rules::ResourceAffinity > > And in fact, having a PVE::HA::Helpers depend on those two seems bad for > moving forward, because it means that those two modules won't be able to > use PVE::HA::Helpers without creating a circular dependency. Ideally, > the PVE::HA::Helpers module would not have such dependencies and be > usable from essentially any other HA module. > > So considering the two dependencies, what about putting > get_resource_motion_info() in PVE::HA::Rules itself? It is a more > top-level function that depends on the rule submodules, so that seems to > be a fitting place. As discussed off-list, unfortunately get_resource_motion_info(...) cannot be moved to PVE::HA::Rules that easily because it is the base plugin for PVE::HA::Rules::{NodeAffinity,ResourceAffinity} and therefore cannot depend on them either.. @Fiona suggested that in the long-term it would be great to split the plugin-related parts of PVE::HA::Rules out into PVE::HA::Rules::Plugin, which would make it easier to encapsulate the Rules module, but we agreed to postpone it to its own patch series. For now, since PVE::HA::Tools already exists as a module to have helpers, which do not have any inner HA-related dependencies, we agreed that PVE::HA::Helpers would be fine as a helper module with HA dependencies.. albeit I still might change the name to something more telling in a v2. _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel