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 5B9FE1FF164 for ; Fri, 25 Apr 2025 09:40:14 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 281D91D44C; Fri, 25 Apr 2025 09:40:22 +0200 (CEST) Message-ID: Date: Fri, 25 Apr 2025 09:39:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Fiona Ebner , Proxmox VE development discussion References: <20250325151254.193177-1-d.kral@proxmox.com> <20250325151254.193177-5-d.kral@proxmox.com> Content-Language: en-US From: Daniel Kral In-Reply-To: X-SPAM-LEVEL: Spam detection results: 0 AWL 0.012 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: Re: [pve-devel] [PATCH ha-manager 03/15] usage: add get_service_node and pin_service_node methods 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On 4/24/25 14:29, Fiona Ebner wrote: > Am 25.03.25 um 16:12 schrieb Daniel Kral: >> Add methods get_service_node() and pin_service_node() to the Usage class >> to retrieve and pin the current node of a specific service. > > Hmm, not sure about calling it "pin", why not "set"? > >> >> This is used to retrieve the current node of a service for colocation >> rules inside of select_service_node(), where there is currently no >> access to the global services state. >> >> Signed-off-by: Daniel Kral >> --- >> For me this is more of a temporary change, since I don't think putting >> this information here is very useful in the future. It was more of a >> workaround for the moment, since `select_service_node()` doesn't have >> access to the global service configuration data, which is needed here. >> >> I would like to give `select_service_node()` the information from e.g. >> $sc directly post-RFC. > > Yes, this sounds cleaner than essentially tracking the same things twice > in different places. Can't we do this as preparation to avoid such > temporary workarounds? Yes, we can definitely do this as I'm also not a fan of copying information at all. I just did it here for the RFC as I wanted to focus on implementing the core functionality first and making it pretty afterwards. So this patch will be dropped/changed to restructure the signature of select_service_node(...) to have more information where the services are currently configured to run in the next revision. _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel