From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH] ts-hosts-allocate-Executive: Do not allocate specific host with wrong blessing Date: Tue, 29 Sep 2015 15:14:38 +0100 Message-ID: <1443536078-23449-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZgvgA-0002lp-FC for xen-devel@lists.xenproject.org; Tue, 29 Sep 2015 14:14:50 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- ts-hosts-allocate-Executive | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) 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)"); } -- 1.7.10.4