> +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)



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to