diff mbox

[OSSTEST,1/2] ts-hosts-allocate-Executive: Move $prevfail_bonus initial setting

Message ID 1495713067-19757-1-git-send-email-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Jackson May 25, 2017, 11:51 a.m. UTC
No functional change.  This is going to make the next patch easy.

Reported-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-hosts-allocate-Executive | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Roger Pau Monne May 26, 2017, 8:50 a.m. UTC | #1
On Thu, May 25, 2017 at 12:51:06PM +0100, Ian Jackson wrote:
> No functional change.  This is going to make the next patch easy.
> 
> Reported-by: Roger Pau Monné <roger.pau@citrix.com>
> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
> ---
>  ts-hosts-allocate-Executive | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
> index 9955cba..7494291 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}
                                                            ^;

Apart from that, you can add my:

Tested-by: Roger Pau Monné <roger.pau@citrix.com>

To both patches.

Thanks, Roger.
diff mbox

Patch

diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index 9955cba..7494291 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;