From: Ian Jackson Date: Tue, 29 Sep 2015 13:47:33 +0000 (+0100) Subject: ts-hosts-allocate-Executive: Do not allocate specific host with wrong blessing X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=20f8bdb9cf39bcb3466a18f58b513bf2694d512a;p=osstest.git ts-hosts-allocate-Executive: Do not allocate specific host with wrong blessing If the job contains a runvar specifying a specific host, still check that host's blessing. Otherwise bisections can run on unblessed hosts. They should fail instead. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index dd9fcf2..88da504 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -279,26 +279,26 @@ sub hid_find_possibilities ($) { my $use= $hid->{OverrideUse} || $r{ $hid->{Ident} }; - my $findhostsq; - if (defined $use) { - print DEBUG "HID $hid->{Ident} USE $use\n"; - $findhostsq= $dbh_tests->prepare(<execute('host',$use); - } else { - print DEBUG "HID $hid->{Ident} INTENDED $fi->{intended}\n"; - $findhostsq= $dbh_tests->prepare(<{Ident} INTENDED $fi->{intended}\n"; + my $findhostsq = <execute("blessed-$fi->{intended}"); + my @findhostsqvars = ("blessed-$fi->{intended}"); + + if (defined $use) { + print DEBUG "HID $hid->{Ident} USE $use\n"; + $findhostsq .= <prepare($findhostsq); + $findhostsq->execute(@findhostsqvars); + my $equivstatusq= $dbh_tests->prepare(<{Ident} nonexistent?"); + logm("specified host $use for $hid->{Ident} nonexistent or unblessed?"); } else { logm("no suitable host for $hid->{Ident} (out of $any)"); }