From: Ian Jackson Date: Thu, 25 May 2017 11:47:05 +0000 (+0100) Subject: ts-hosts-allocate-Executive: Move $prevfail_bonus initial setting X-Git-Tag: openstack-v11~34 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3d16abff00bbcfd97b80fcc088af938a64861451;p=people%2Faperard%2Fosstest.git ts-hosts-allocate-Executive: Move $prevfail_bonus initial setting No functional change. This is going to make the next patch easy. Reported-by: Roger Pau Monné Signed-off-by: Ian Jackson --- diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index 9955cbad..82ef6285 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -618,6 +618,8 @@ sub hid_recurse ($$) { $duration_rightaway_adjust=0 if $start_time; + my $prevfail_bonus = $r{hostalloc_bonus_previousfail}; + my $duration_for_cost = 0; if ($jobinfo->{recipe} =~ m/build/) { $variation_age= 0; @@ -630,7 +632,7 @@ sub hid_recurse ($$) { $variation_bonus=$max_variation_bonus if $variation_bonus>$max_variation_bonus; - my $prevfail_bonus = $r{hostalloc_bonus_previousfail} // 7.0*86400; + $prevfail_bonus //= 7.0*86400; my $prevfail_equiv_bonus = $prevfail_bonus * (6.5 / 7.0); my $share_reuse_bonus = $r{hostalloc_bonus_sharereuse} // 10000;