Skip to content

Commit

Permalink
wip -- tests fail -- Improve worker load limit
Browse files Browse the repository at this point in the history
  • Loading branch information
okurz committed Oct 15, 2024
1 parent 689af42 commit 7d9d9ea
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 @@ -765,7 +765,8 @@ sub _check_system_utilization ($self) {
my @load = _load_avg;
return undef unless @load;
return "The average load (@load) is exceeding the configured threshold of $threshold."
if $load[2] > $threshold;
#unless max @load < $threshold || ($load[0] < $threshold && $load[0] < $load[1] && $load[1] < $load[2]);
if max @load > $threshold && $load[0] > $load[1] && $load[1] > $load[2];
return undef;
}

Expand Down
2 changes: 1 addition & 1 deletion t/24-worker-overall.t
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $ENV{OPENQA_CONFIG} = "$FindBin::Bin/data/24-worker-overall";
# file specified via OPENQA_LOGFILE instead of stdout/stderr.
$ENV{OPENQA_LOGFILE} = undef;

my $load_avg_file = simulate_load('0.93 0.95 10.25 2/2207 1212', 'worker-overall-load-avg');
my $load_avg_file = simulate_load('10.93 10.91 10.25 2/2207 1212', 'worker-overall-load-avg');

# define fake isotovideo
{
Expand Down

0 comments on commit 7d9d9ea

Please sign in to comment.