From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 5B9FE1FF164 for <inbox@lore.proxmox.com>; 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: <ba3aac59-775e-459a-9b74-a79f38fe5d96@proxmox.com> Date: Fri, 25 Apr 2025 09:39:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Fiona Ebner <f.ebner@proxmox.com>, Proxmox VE development discussion <pve-devel@lists.proxmox.com> References: <20250325151254.193177-1-d.kral@proxmox.com> <20250325151254.193177-5-d.kral@proxmox.com> <d6d55f44-70a1-4da8-b19c-a88667126e14@proxmox.com> Content-Language: en-US From: Daniel Kral <d.kral@proxmox.com> In-Reply-To: <d6d55f44-70a1-4da8-b19c-a88667126e14@proxmox.com> 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 <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> 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 <d.kral@proxmox.com> >> --- >> 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