Skip to content

Commit

Permalink
Make 'Broken' workers show as 'Unavailable' instead
Browse files Browse the repository at this point in the history
This commit displays "Broken" workers as instead "Unavailable",
as the previous wording was e.g. not including workers which where
unavailable due to 'too high load'.
For the same reason the 'Error' title of the worker states hover popup is replaced with
'Details' and the 'too high load' output is enhanced.

Related Ticket: https://progress.opensuse.org/issues/164084
  • Loading branch information
Robert Richardson committed Dec 2, 2024
1 parent 35e1cc4 commit d39a798
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/OpenQA/Worker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,8 @@ sub _check_system_utilization (
return undef unless $threshold && @$load >= 3;
# look at the load evolution over time to react quick enough if the load
# rises but accept a falling edge
return "The average load (@$load) is exceeding the configured threshold of $threshold."
return
"The average load (@$load) is exceeding the configured threshold of $threshold. The worker will temporarily not accept new jobs until the load is lower again."
if max(@$load) > $threshold && ($load->[0] > $load->[1] || $load->[0] > $load->[2] || min(@$load) > $threshold);
return undef;
}
Expand Down
2 changes: 1 addition & 1 deletion templates/webapi/admin/workers/worker_status.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
)
%>
% } elsif ($worker->{status} eq 'broken') {
Broken <%= help_popover(Error => $worker->{error}) %>
Unavailable <%= help_popover(Details => $worker->{error}) %>
% } elsif ($worker->{alive}) {
Idle
% } else {
Expand Down

0 comments on commit d39a798

Please sign in to comment.