From: Ian Jackson Subject: [OSSTEST PATCH 5/7] Nested: Do not attempt to look up nested host ownership in DB Date: Mon, 16 Nov 2015 17:54:23 +0000 Message-ID: <1447696465-24978-6-git-send-email-ian.jackson@eu.citrix.com> References: <1447696465-24978-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 1ZyNzC-0000FS-Uy for xen-devel@lists.xenproject.org; Mon, 16 Nov 2015 17:54:39 +0000 In-Reply-To: <1447696465-24978-1-git-send-email-ian.jackson@eu.citrix.com> 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: Robert Ho , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Signed-off-by: Ian Jackson --- Osstest/JobDB/Executive.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm index 6ba3d37..2572f5f 100644 --- a/Osstest/JobDB/Executive.pm +++ b/Osstest/JobDB/Executive.pm @@ -125,6 +125,14 @@ END sub host_check_allocated ($$) { #method my ($jd, $ho) = @_; + + if ($ho->{Host}) { + # This is a nested guest; check allocation of the parent host. + # We don't attempt to set Shared, SharedMaybeOthers, etc. + # (since nested hosts aren't shared between jobs). + return $jd->host_check_allocated($ho->{Host}); + } + $ho->{Shared}= resource_check_allocated('host', $ho->{Name}); $ho->{SharedMaybeOthers}= $ho->{Shared} && -- 1.7.10.4