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 E2C0088AB for ; Wed, 16 Nov 2022 10:10:39 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C3F3A1C7AA for ; Wed, 16 Nov 2022 10:10:09 +0100 (CET) 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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 16 Nov 2022 10:10:09 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 0D60F44AE8; Wed, 16 Nov 2022 10:10:09 +0100 (CET) Message-ID: Date: Wed, 16 Nov 2022 10:10:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Content-Language: en-US To: pve-devel@lists.proxmox.com, "DERUMIER, Alexandre" References: <20221110143800.98047-1-f.ebner@proxmox.com> <20221110143800.98047-16-f.ebner@proxmox.com> <6ce139f374b7e12a230ac72b583ac0a565f91265.camel@groupe-cyllene.com> From: Fiona Ebner In-Reply-To: <6ce139f374b7e12a230ac72b583ac0a565f91265.camel@groupe-cyllene.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: =?UTF-8?Q?0=0A=09?=AWL 0.028 Adjusted score from AWL reputation of From: =?UTF-8?Q?address=0A=09?=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 =?UTF-8?Q?Alignment=0A=09?=NICE_REPLY_A -0.001 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF =?UTF-8?Q?Record=0A=09?=SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH ha-manager 06/11] usage: add Usage::Static plugin 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: Wed, 16 Nov 2022 09:10:39 -0000 Am 15.11.22 um 16:55 schrieb DERUMIER, Alexandre: > >> +sub score_nodes_to_start_service { >> +    my ($self, $sid, $service_node) = @_; >> + >> +    my $score_list = eval { >> +       my $service_usage = get_service_usage($self, $sid, >> $service_node); >> +       $self->{scheduler}- >>> score_nodes_to_start_service($service_usage); >> +    }; >> +    if (my $err = $@) { >> +       $self->{haenv}->log( >> +           'err', >> +           "unable to score nodes according to static usage for >> service '$sid' - $err", >> +       ); >> +       # TODO maybe use service count as fallback? > > Maybe you use add "service count" in criterias with the lowest priority > ? > > (I have done it like this if I remember) > The fallback is intended to be used when something goes wrong with the calculation or interfacing with the Rust backend. So we can't add the fallback in the Rust backend, but would need to do it in the Perl module directly. The TOPSIS calculation is only expected to fail if a f64::NAN ends up in the TOPSIS Matrix somehow, which also shouldn't happen in absence of bugs. But it's good to be prepared for unexpected bugs in the interfacing and calculation of course.