[pve-devel] [PATCH ha-manager 06/11] usage: add Usage::Static plugin
DERUMIER, Alexandre
Alexandre.DERUMIER at groupe-cyllene.com
Tue Nov 15 16:55:27 CET 2022
> +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)
More information about the pve-devel
mailing list