From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605208; cv=none; d=zoho.com; s=zohoarc; b=c0q3iZfy2NTmS0zc6TMGOjcO2CGKBj3Uu8SejftFeILTNNj2/ENzYihYKEpnmOJ8oqk88ertg4ExlzG4J0mUiMyfUoBBHLsBnmFEuMUDAqyRY5c/aA4zzhlbthMHE5o2pY7n1u+aXuLRMZ/+D+Lo8xaX5ik6c6hVdSAwNPHFF7E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605208; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=aggdcORdJxW4DMOPTd35Zpo80gu0r+30MunwuTxpidU=; b=fI36Q6nCufWu1p9uhlrTj8Qzh+Rgd3dpiFjyGZlL/aEsUV+/H9wJeRTMTi7T1Ty2lqilsBWMI71hnWXGcQ/+Wwawwl2eaF95sFXhrzKQcCNxLH7g2BvQEx3ygP/YLarVwr+tdB/+QKQP4GSJU2LxML/+dRkQGNtDnidBjryGmBc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605208752496.05967408255776; Thu, 18 Apr 2019 09:33:28 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xN-00026J-Vt; Thu, 18 Apr 2019 16:32:13 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xM-00023B-8j for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:12 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 83e60480-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:11 +0000 (UTC) X-Inumbo-ID: 83e60480-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913785" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:38 +0100 Message-ID: <20190418163158.11408-2-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 01/21] ts-hosts-allocate-Executive: with -U, just append to the same logfile X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This is much more convenient for ad-hoc use. Signed-off-by: Ian Jackson --- ts-hosts-allocate-Executive | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index dcfc70f2..3da138b1 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -75,16 +75,18 @@ sub setup () { =20 $taskid=3D findtask(); =20 - my $logbase =3D "hosts-allocate.debug".($compressdebug?".gz":""); - my $logfh =3D open_unique_stashfile \$logbase; + my $logbase =3D "hosts-allocate.debug"; if ($compressdebug) { + $logbase .=3D ".gz"; + my $logfh =3D open_unique_stashfile \$logbase; my $logchild =3D open DEBUG, "|-"; defined $logchild or die $!; if (!$logchild) { open STDOUT, ">&", $logfh or die $!; exec "gzip" or die $!; } } else { - open DEBUG, ">&", $logfh or die $!; + my $logfh =3D "$stash/$logbase"; + open DEBUG, ">>", $logfh or die $!; } DEBUG->autoflush(1); logm("host allocation debug log in $logbase"); --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605209; cv=none; d=zoho.com; s=zohoarc; b=nBUAAYievRCT9sF/ene7sOsD2L5ulLviMjX/1COBLzkRtfdxSZKsNMIjFXZYNUM28iKDD9JfrbNM6/McKthrfuIql6Ko/vr/rHl7uYQ3B6eDWZRGY5nfMfhEuoeZa3q5vzlSn+1XLFjybhfFXei89lFCjMedpC2RM1Ynag5wKLI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605209; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=UwMwBFn1klPe7BWpw7ajMh87gFxjC6RsnKSH7LonLEo=; b=HEVHmlazrUrmuYUzmJnnzHjMRtXXCzaIjbnp/X+UtcFBYCHUNfrYHKP6aqrKbEbdWed+lAvAAnFHwyeg6nfUbPpmJqvxxExdAT7MZr1si0O2CQ0Aw3+DN3VMfV7sTP7JiGthwz7/7e1VaY9yH/RoWrsARJrzRcSf0TLdJssbp1k= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605209930913.1733344610899; Thu, 18 Apr 2019 09:33:29 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xH-0001zF-Kg; Thu, 18 Apr 2019 16:32:07 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xG-0001z1-HH for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:06 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 802a5459-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:05 +0000 (UTC) X-Inumbo-ID: 802a5459-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913760" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:39 +0100 Message-ID: <20190418163158.11408-3-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 02/21] selecthost: Honour new $none_ok optional parameter X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" No functional change with existing callers. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index ec867e4f..38c17d60 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1125,9 +1125,9 @@ sub power_state ($$;$) { =20 #---------- host selection and properties ---------- =20 -sub selecthost ($); -sub selecthost ($) { - my ($ident) =3D @_; +sub selecthost ($;$); +sub selecthost ($;$) { + my ($ident, $none_ok) =3D @_; # must be run outside transaction =20 # $ident is @@ -1154,7 +1154,10 @@ sub selecthost ($) { $r{$ident}=3D $name; } else { $name=3D $r{$ident}; - die "no specified $ident" unless defined $name; + if (!defined $name) { + return undef if $none_ok; + die "no specified $ident"; + } } =20 my $ho=3D { --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605197; cv=none; d=zoho.com; s=zohoarc; b=oYqYK7rzBsBBS4Dg7yPUe9FKSTjWq9KAGi0IWErkKrh7oC8h+BSiGrhsfnRMxfqa8LUMpKNx7NgPv3f0rCjm8waRfHy5Db/49wnDfcOEBuYtjBb7h6Knd/hvl/+0SAVDNy9ZPAsPshQKGXprQ7VxJ3RrATT2uaPoLleEDz6IJik= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605197; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=+m86WeWsKAagwLO5nbZWzEWFhrkroqJJcX9t56WEqwY=; b=iHYXej+Ly9lv0XrAuKz191vuP6GFrrJM3FDf3GtxR7uiMIKh3fmHt0ZGo7bP3ZNWaFa9xViqabMi0NwE7lk/5yjW1mPzJGMa4UIkAenzTDZPV1oR9jZfxJl2FeYhkXuWmY0PjrjaJDeguLRLOSuJrZrLb4EMhK4DvE1jix25Yo8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 155560519760385.40076795410698; Thu, 18 Apr 2019 09:33:17 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xI-0001zf-Ua; Thu, 18 Apr 2019 16:32:08 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xG-0001z3-MF for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:06 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 80c5613d-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:05 +0000 (UTC) X-Inumbo-ID: 80c5613d-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913761" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:40 +0100 Message-ID: <20190418163158.11408-4-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 03/21] ts-logs-capture: Do not try to capture logs of hosts not allocated X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Little significant change with existing non-broken flights etc. Signed-off-by: Ian Jackson --- ts-logs-capture | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ts-logs-capture b/ts-logs-capture index a429bb76..83234f6f 100755 --- a/ts-logs-capture +++ b/ts-logs-capture @@ -32,7 +32,12 @@ if (!$mjobdb->jobdb_enable_log_capture) { =20 our ($whhost) =3D @ARGV; $whhost ||=3D 'host'; -our $ho=3D selecthost($whhost); + +our $ho=3D selecthost($whhost, 1); +if (!$ho) { + logm("host $whhost not specified, not capturing logs"); + exit 0; +} =20 our @guests; =20 --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605178; cv=none; d=zoho.com; s=zohoarc; b=Tj1iLmAchSg9ndf5uWokNsPDNEzpd0k9ISBmqCn5IP+Oy2HV2k9AjZDNEtD1DrSVrqhgt4X/CDAcpIL+TFjPeiv687LBNrT6kuLC/xN9AjHiKITYZcdsctmK6Ie5Bmhk2OEoaXZXNFtZ0jN01l4z9dgMdQNBvWW0h2X7JYEAQt0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605178; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=u7F1RNdP/iWvzHVWBX0ahZCcv6HIzTCGHxhHjDA3CeM=; b=YA08YZrQFopvsZlrQE4Yl9k+ocMwRU1gvZ9x1fTJTwZEdsqMbtZrB0aVmE0jQDlq48tFyXRw+yQumEF7z/8VWBlBlQqOO47PgvtphSAovwMpShxNdpGS+mjON12czhSGZ+xqRRlVFSKE+f3d7plkd10cRZhseOAgJAg9sbNeUYY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 155560517878410.990493634445784; Thu, 18 Apr 2019 09:32:58 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xU-0002IZ-Kc; Thu, 18 Apr 2019 16:32:20 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xR-0002CN-JH for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:17 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 86bfa75d-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:15 +0000 (UTC) X-Inumbo-ID: 86bfa75d-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913805" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:41 +0100 Message-ID: <20190418163158.11408-5-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 04/21] alloc_resources: Support special abandonment values X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This gives a way for the caller's $resourcecall to signal something interesting, back to its main loop. This is useful for calling broken, for example: that can't be done within $resourcecall because $resourcecall operates within the allocation db transaction (which ought to be rolled back...) Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index 0d8502b5..b27b8d25 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -737,7 +737,8 @@ sub alloc_resources { # # values of $ok # 0 rollback, wait and try again - # 1 commit, completed ok + # 1 commit, completed ok } return the + # >1 rollback and abandon } value of $ok # $bookinglist should be undef or a hash for making a booking # # $resourcecall should not look at tasks.live @@ -859,10 +860,14 @@ sub alloc_resources { # $resourcecall itself failed: bomb out (don't retry) $ok=3D-1; } - return db_retry_abort() unless $ok>0; + return db_retry_abort() unless $ok=3D=3D1; }]); =20 - if ($bookinglist && $ok!=3D-1) { + if ($ok<0 || $ok>1) { + return 1; + } + + if ($bookinglist) { my %prstart; foreach my $book (@{ $bookinglist->{Bookings} }) { my $pr =3D $book->{Reso}; @@ -890,8 +895,6 @@ sub alloc_resources { =20 if ($ok=3D=3D1) { print $qserv "thought-done\n" or die $!; - } elsif ($ok<0) { - return 1; } else { # 0 logm("resource allocation: deferring"); print $qserv "thought-wait\n" or die $!; @@ -935,8 +938,12 @@ END $ok=3D 0; } } - die unless $ok=3D=3D1; - logm("resource allocation: successful."); + if ($ok=3D=3D1) { + logm("resource allocation: successful."); + } else { + logm("resource allocation: resourcecall returned ($ok,...)"); + } + return $ok; } =20 sub resource_check_allocated ($$) { --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605200; cv=none; d=zoho.com; s=zohoarc; b=Lnk5qQufcpjAseBq9l4JWM6kYHwzXPh87lfODpkW71uPY6I6zcQajz5Vq5FZwqGEPMQvZGIo+b9zRUnGLNlmXqxZgoeZqs9i8LGz5ThO2nrmgHBqiFOb3RFO43L8NU38FW2qA6QBtK2yUiJWDeNZ7IY1Ui6358Ij6TbGksW4x0I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605200; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=qvsNkduEWwsLpOa3O99Z77P5UqQK1B+Tz1cuLviByYA=; b=anepv2HaQuGxnshWlmfxZVxRWWcrYDbBMe5ak9wblPyhM/WDhi3gLxUtwljhtW6xZTrFGn35chP+Jf3j65m2rI8jJAYrC/QiO8zelmTmwZwx6DdR1EJb2mVl9YFnkTNqQZEHgspMKzlvQKt6DDCt1LnBKwkuiDeo5K0cCK3sr18= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 15556052004121018.3956377415419; Thu, 18 Apr 2019 09:33:20 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xM-000239-5J; Thu, 18 Apr 2019 16:32:12 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xK-00021J-Bn for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:10 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 80d03be8-61f7-11e9-85af-93c07e66e988; Thu, 18 Apr 2019 16:32:06 +0000 (UTC) X-Inumbo-ID: 80d03be8-61f7-11e9-85af-93c07e66e988 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913762" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:42 +0100 Message-ID: <20190418163158.11408-6-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 05/21] starvation: Teach sg-report-flight about starved step state X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" We are going to use this for situations where the resources to run the test weren't available. In general we are going to treat this as not a regression. Signed-off-by: Ian Jackson --- sg-report-flight | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sg-report-flight b/sg-report-flight index a1adf952..2677c479 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -805,9 +805,9 @@ END next; } =20 - if ($st eq 'blocked') { - print MRO "blocked $s->{job} $s->{testid}\n"; - print DEBUG " blocked, call it justifiable\n"; + if ($st eq 'blocked' or $st eq 'starved') { + print MRO "$st $s->{job} $s->{testid}\n"; + print DEBUG " $st, call it justifiable\n"; $failv->{Summary}=3D 'n/a'; $failv->{Blocker}=3D ''; next; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605204; cv=none; d=zoho.com; s=zohoarc; b=QUZUT2Iob5InoLt7TMr30sGxhiZWExNB8gSAS/2+r2VJQ9hTfFeyN37ldMO5P2e8CweRuciMhPvdpOROfDq2++F+XCH1kSLRvtaQ1gjbtMulF2KVTHzgruh4t/YLzwspj/TRd1PvWEiUa7jKefs+3W1010g0WNCN/nZp0na1ZJ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605204; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=oi8UFTr92xJ9TsbkOCxfTmiP8lMP3AvAt9y5MlMct34=; b=G0mPD38m26MsmnEEefPKN+5LIsTTyxF/MUg7Q2jgPjiS44znMBGQ/5SDP64F3c/7rzK5opoW70ck5eXIiX1egLHSRxWWuSJKwo2xIvnSJkCt8y1p+1UrIdKFImrCXB0rCpqQxl4hIl0hINGkWpyFGG1jXEmtK12aY0S0qEU5wtk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605204086885.1557153576906; Thu, 18 Apr 2019 09:33:24 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xP-000287-FH; Thu, 18 Apr 2019 16:32:15 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xN-00025i-O2 for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:13 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 83ee2663-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:11 +0000 (UTC) X-Inumbo-ID: 83ee2663-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913792" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:43 +0100 Message-ID: <20190418163158.11408-7-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 06/21] starvation: Teach archaeologists about starved job state X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" sg-report-flight is a bit awkward. It thinks mostly about step status, not job status. So, when justifying, if we don't find a step, and the job state is starved, we treat the step as starved. If there are only starved steps, then we don't have evidence that this is a regression, because the test wasn't run in the baseline. If there are other steps we look at those instead. Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 4 ++-- sg-report-flight | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index b27b8d25..a9f9ac78 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -362,8 +362,8 @@ END Content =3D> (join " | ", @content), ColourAttr =3D> "bgcolor=3D\"$failcolour\"", }; - } elsif ($status eq 'blocked') { - return $single->("blocked", $purple), + } elsif ($status eq 'blocked' or $status eq 'starved') { + return $single->($status, $purple), } elsif ($status eq 'queued') { return $single->("($status)", $grey_dark), } elsif ($status eq 'preparing') { diff --git a/sg-report-flight b/sg-report-flight index 2677c479..6c481f6f 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -160,6 +160,10 @@ sub findaflight ($$$$$) { return undef; } =20 + my $jcheckq=3D db_prepare(<execute($tflight, $job, $testid); ($chkst) =3D $checkq->fetchrow_array(); + if (!defined $chkst) { + $jcheckq->execute($tflight, $job); + my ($jchkst) =3D $jcheckq->fetchrow_array(); + $chkst =3D $jchkst if $jchkst eq 'starved'; + } } $whynot=3D $sub->($tflight, $chkst) if !defined $whynot; if (!defined $whynot) { @@ -861,6 +870,8 @@ END my $tblocker =3D $st eq 'fail' ? 'regression' : $st; my $tpriority =3D $j->{job} =3D~ m/^build/ ? 600 : 100; $rtup=3D [ $tpriority, $tblocker, "REGR. vs.", $chkflight ]; + } elsif ($chkst eq 'starved') { # actually, the job was 'starved' + $rtup=3D [ 50, '', "starved in", $chkflight ]; } else { $rtup=3D [ 170, '', "$chkst in", $chkflight ]; } --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605199; cv=none; d=zoho.com; s=zohoarc; b=DZ/qU5qHEfpiImYub8+nmDXSlsvMV/9uSfPaDlaTgfl/5PWFzOpMCWHUvek7KCSROchGNXP9xxnHozpp1I1Vb9BX5UPEMdSvfglArQrrrKVgN+J9//A3zODZFsdLf6qHx+PK/jp2v7WPZzRrwvYrY+1dM5lYeHK3DA3kwNgvndc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605199; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=SjhMFG7gw3EbyuqzyywgRARYWkj1/Vbe3esZvI5/ylI=; b=NnkOhXpoV2kLHOL2vw6b8gBTeV86PDl5tCcdlBOa8LVHXINuTXhsdHLO9gYmh64wep7ctPIWftpfm6zWuSAkp59jMubkQuG1uR6YBUjkcnMhjHbbXiJXr1aRdMl8WRonVk26t8Bok5AyEv2co3RBoV/mqXZ/j95YqQLuyJpC424= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605199321581.8291899953184; Thu, 18 Apr 2019 09:33:19 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xJ-0001zl-8m; Thu, 18 Apr 2019 16:32:09 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xH-0001zL-UF for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:07 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 81303893-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:06 +0000 (UTC) X-Inumbo-ID: 81303893-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913766" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:44 +0100 Message-ID: <20190418163158.11408-8-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 07/21] starvation: Teach ms-flights-summary about job state starved X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This just affects sorting etc. in the summary display. Signed-off-by: Ian Jackson --- ms-flights-summary | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ms-flights-summary b/ms-flights-summary index 9d15dd14..8293d4f6 100755 --- a/ms-flights-summary +++ b/ms-flights-summary @@ -145,10 +145,11 @@ sub sort_stats($) { preparing =3D> 2, 'prep.alloc.' =3D> 3, blocked =3D> 4, - running =3D> 5, - pass =3D> 6, - fail =3D> 7, - broken =3D> 8, + starved =3D> 5, + running =3D> 6, + pass =3D> 7, + fail =3D> 8, + broken =3D> 9, ); return sort { ($so{$a}//0) <=3D> ($so{$b}//0) } (keys %{$stats}); } --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605195; cv=none; d=zoho.com; s=zohoarc; b=hHD0Y9Z6Fu/eG52cY9nTHAjFVLERxZNQz8JFA2evv3JnqGu3yAPO5Q0B/Z+SRbX3deQJ2NQJoy3ZzYhlg1/7dRFfBf/7YWE1QtZ0N1lEsVuRJ9u05ODlizBCPoMnQjQqNm6GNe1xJXHLguaIb28qLGAbYFptbWV1tCEOD7nupeE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605195; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=g7NCRNUkPGYEeIUGcg4BbnrOodziz6MHvzslSuaBHnw=; b=iRht26ZjzodJ8usuaZzne+5eOTDf1h07sAzVxkHTn+OGsgooWd5CTa4NVBh2TXrAoMxz3+btCK6/H/eAv35s37JAdnb0JYf/yEkwxLBHhEmUOIiLh47ry00ssjCkc4Auhx4u5YXIz5OGAePxwVmJ8hpNkUhH1tDV2uZN1OBfvvg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 155560519562565.55041471042364; Thu, 18 Apr 2019 09:33:15 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xJ-00020S-IC; Thu, 18 Apr 2019 16:32:09 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xH-0001zM-Vp for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:08 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 8191b2ab-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:07 +0000 (UTC) X-Inumbo-ID: 8191b2ab-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913767" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:45 +0100 Message-ID: <20190418163158.11408-9-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 08/21] starvation: Teach sg-execute-flight about job state starved X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" It needs to not mind if a job reports as `starved', even if sg-run-job exited non-zero. Signed-off-by: Ian Jackson --- sg-execute-flight | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sg-execute-flight b/sg-execute-flight index aed9823d..02f63316 100755 --- a/sg-execute-flight +++ b/sg-execute-flight @@ -189,7 +189,7 @@ proc main_iteration {} { if {!$found} { error "job not in database $flight $job" } =20 switch -exact -- $jobinfo(status) { - pass - fail - broken - blocked - truncated { + pass - fail - broken - blocked - truncated - starved { } queued - preparing - running { jobdb::job-set-status-unlocked $flight $job broken --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605195; cv=none; d=zoho.com; s=zohoarc; b=Qm817kGfX1Io/LaOaaNFnH0ALHcwuV74Dx3b1ZH3lvkg5Rk9nwSm9ygbiPR82LoeKdvjr5Rd5JQNv7SQFarwiEM+zzqbUGbGveSyIBhjPOvDAjR0FxbHvbGRQ/SIXany0QhBEItUOqXGzkJTu9yzNpbvSEI2S7jZbq2eGhysz/I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605195; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=sHt3KZkRiTNEbMifnNedUe8EP/jR62IlYCtJGwfM1nI=; b=HJvJOeB4WS2symzecnVtkj0/69TdoND5vpsE5fPRJMrVq6eUXSQPu+EN8+SnTpvPgK8xmO+SWzyd0kUg/+8w4xa2ocxwfZqNjU6dSUlxJuwc2MSFbmCyegk2qP61GqLycIt14rTYz/0by1GvA01KJwv2BnKk/hy44KDojzji12o= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605195617565.7815222672676; Thu, 18 Apr 2019 09:33:15 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xL-00022m-T4; Thu, 18 Apr 2019 16:32:11 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xK-00021L-CH for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:10 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 819cb696-61f7-11e9-a51d-0bdd52c2ff68; Thu, 18 Apr 2019 16:32:07 +0000 (UTC) X-Inumbo-ID: 819cb696-61f7-11e9-a51d-0bdd52c2ff68 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913769" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:46 +0100 Message-ID: <20190418163158.11408-10-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 09/21] step handling: Preserve step states set by ts-* scripts X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" sg-run-job would unconditionally set the step state to the value it calculated, which would usually be `pass' or `fail' or `broken' (according to the recipe). Relax this interface somewhat to allow a test script to set the step status itself: specifically, do not overwrite an existing status of aborted broken starved Signed-off-by: Ian Jackson --- tcl/JobDB-Executive.tcl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl index 70728953..57ded025 100644 --- a/tcl/JobDB-Executive.tcl +++ b/tcl/JobDB-Executive.tcl @@ -316,11 +316,14 @@ proc spawn-step-commit {flight job stepno testid} { =20 proc step-set-status {flight job stepno st} { transaction flights { - db-update-1 " + db-execute " UPDATE steps SET status=3D'$st', finished=3D[clock seconds] WHERE flight=3D$flight AND job=3D'$job' AND stepno=3D$stepno + AND status<>'aborted' + AND status<>'broken' + AND status<>'starved' " set pause 0 db-execute-array stopinfo " --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605185; cv=none; d=zoho.com; s=zohoarc; b=lkg9yB/dp77WKwuiOHavcI3pJER/ozEdcdt0Y23l85BqwweIHUbRGgF5zfWnXGNss3npHgC/jqCntbPSA2os+yBzC8+2O7hjjY41ZoArku4yN4u5DMQq1LxNqWY88XrL1nepyuhIt1qaJ+6TYPQqiox8Geb/Br0AMgdoxR7pdXY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605185; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Ln5tPJJZvJpDSGj3QLB5aM8f+e/DsFe3nxc3WmFfJbQ=; b=ZpeEZjRGA21HvAAuJa6OSqXbSEqTyDRRCwZkeSQdYBK3Uwjm6TjqKRcNaGO+5lUCZZ5UsJAPaoNJEVpeBkHLF05T1NYf/FwvGDMEbRRSJKs6fffkZTBssXzB3l/zebVl/6/cd+4wKN3NwgY1Q53aXs96+nugQRLbL2UoBMuzbY0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605185261932.2764424722733; Thu, 18 Apr 2019 09:33:05 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xQ-0002A8-HF; Thu, 18 Apr 2019 16:32:16 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xO-00026E-42 for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:14 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 850054c1-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:13 +0000 (UTC) X-Inumbo-ID: 850054c1-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913794" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:47 +0100 Message-ID: <20190418163158.11408-11-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 10/21] TestSupport: Make "broken" print the actual job state X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" No functional change except to a message. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 38c17d60..e218ff35 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -242,7 +242,7 @@ sub broken ($;$) { AND (status=3D'queued' OR status=3D'running' OR status=3D'p= reparing') END }); - die "BROKEN: $m; ". ($affected>0 ? "marked $flight.$job $newst" + die uc($newst).": $m; ". ($affected>0 ? "marked $flight.$job $newst" : "($flight.$job not marked $newst)"); } =20 --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605204; cv=none; d=zoho.com; s=zohoarc; b=T8/ytlnq40g3+FWY2aImwec4iOhMuMacogZLgYKuu7/mQhqmqsRp3Bu6HY9gEckP1I66RKUxff+SgMs0/12/xZqvb2LKAvDjnWU2Te62IpexYMoLt8HL736ZBfEc/Y8zo0+D82KnV5PTgR9pNs4gSN32uQI1Wx5uqKCk0YAURWU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605204; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=pAmLh/G43UhjnVp5Cl+2SRvFxRn9s7qt9clMi/iSdhk=; b=Ib4AO1ogU8Pqni+ru1zHAWj5HAMSvbXZs87B/AfLklRK6qLNdWqZnaFdaUzUOmgaIVJrf7Z5p6MrYRmCA1A5TzWeOs8SrWPJY2FOjy6snV9I2NgTFguYqGfWugWtcbgcHs3lIkMV9nxiOs1A2woHgKYUyS3oCwouXFmH3zpGec8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605204552482.5697758611683; Thu, 18 Apr 2019 09:33:24 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xJ-00020w-TW; Thu, 18 Apr 2019 16:32:09 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xI-0001zU-67 for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:08 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 81dfbc42-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:07 +0000 (UTC) X-Inumbo-ID: 81dfbc42-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913770" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:48 +0100 Message-ID: <20190418163158.11408-12-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 11/21] JobDB::Executive: step_*: fix log messages to talk about "steps" X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" These functions are about to be sometimes called for non-substep steps. Signed-off-by: Ian Jackson --- Osstest/JobDB/Executive.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm index ea349052..3a680c9d 100644 --- a/Osstest/JobDB/Executive.pm +++ b/Osstest/JobDB/Executive.pm @@ -281,7 +281,7 @@ END $logfile // "$stepno.$script.log", $testid,time); }); - logm("---------- substep $stepno $testid running ----------"); + logm("---------- step $stepno $testid running ----------"); } =20 sub step_finish ($$) { #method @@ -311,7 +311,7 @@ END unless $oldstatus eq 'running'; $setq->execute($stepstatus,time, $flight,$job,$testid, $stepno); }); - logm("---------- substep $stepno $testid $stepstatus ----------"); + logm("---------- step $stepno $testid $stepstatus ----------"); } =20 sub host_check_allocated ($$) { #method --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605198; cv=none; d=zoho.com; s=zohoarc; b=MGw0eyklAJJ9tAFmrgLtIb3W8ICy3DyNeM2oD5aESI9QhMX8pq+rAbwufjoGUYxKiM9S8+DjftoJu7SwpuS1QVfY09Xva4muszO/FJAhlsbx784r7Yu3nD9q6z89r9tYy4JaIQH6NSnVI2XQxYK+xC5iPbBzfxZhmxKi+CaWLJc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605198; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=EtIXjawrN6Yf5oQD+qvbKnpA8EOBwjeki4ZgUKUS2FE=; b=TrMRaeKscF+Eh+SbGIkPB6FfRvHTqrM/A4TC/tfMKTgKxlxjCll2R91zk94BGQc+bWlnmy1B6wt3mdMooZiO/7oDS2U/WnldHNjAI5PC5r3zW4N42ThHQOq+1VWQB64LnFqFkT2QQPBUe8I9cUe3Y7DkF8cOdkaYJNa9vvWJ5no= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605198364288.6333760766656; Thu, 18 Apr 2019 09:33:18 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xK-00021F-7Z; Thu, 18 Apr 2019 16:32:10 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xJ-0001zq-FS for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:09 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 822aa6ce-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:08 +0000 (UTC) X-Inumbo-ID: 822aa6ce-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913772" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:49 +0100 Message-ID: <20190418163158.11408-13-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 12/21] starvation: Permit step_finish to set the state `starved' X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Ian Jackson --- Osstest/JobDB/Executive.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm index 3a680c9d..2e11c8f3 100644 --- a/Osstest/JobDB/Executive.pm +++ b/Osstest/JobDB/Executive.pm @@ -287,7 +287,7 @@ END sub step_finish ($$) { #method my ($jd,$testid,$stepstatus) =3D @_; die "$flight.$job $testid $stepstatus" unless grep { $stepstatus eq $_= } - qw(pass fail skip blocked broken); + qw(pass fail skip blocked broken starved); my $checkq =3D $dbh_tests->prepare(< Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605202690609.4344655363788; Thu, 18 Apr 2019 09:33:22 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xK-00021e-Gt; Thu, 18 Apr 2019 16:32:10 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xJ-0001zr-Gk for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:09 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 828dba8c-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:08 +0000 (UTC) X-Inumbo-ID: 828dba8c-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913773" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:50 +0100 Message-ID: <20190418163158.11408-14-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 13/21] TestSupport: Make "broken" set the step state too X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index e218ff35..8e20244d 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -235,6 +235,17 @@ sub broken ($;$) { # must be run outside transaction my $affected; $newst=3D 'broken' unless defined $newst; + eval { + # This is not always effective, but when we really care is + # situations where $newst is not `broken' (eg `starved') and + # we are running in Executive mode under sg-run-job, and then + # this works. If we are running under sg-run-job, sg-run-job + # will set the step status if we don't manage it. + my $testid =3D $ENV{'OSSTEST_TESTID'} + || die "OSSTEST_TESTID not set"; + $mjobdb->step_finish($testid, $newst); + }; + warn "failed to set step status $newst: $@" if $@; db_retry($flight,'running', $dbh_tests,[qw(flights)], sub { $affected=3D $dbh_tests->do(< Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605202025748.2537196877864; Thu, 18 Apr 2019 09:33:22 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xM-00023s-HJ; Thu, 18 Apr 2019 16:32:12 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xK-00021p-O7 for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:10 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 82e37e41-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:09 +0000 (UTC) X-Inumbo-ID: 82e37e41-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913774" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:51 +0100 Message-ID: <20190418163158.11408-15-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 14/21] tcl/JobDB-Executive: Do not squash "starved" status X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" ts-hosts-allocate is going to set the job status to `starved' sometimes, and then die. `starved' needs to be added to the list of job statuses that sg-run-job leaves alone. Signed-off-by: Ian Jackson --- tcl/JobDB-Executive.tcl | 1 + 1 file changed, 1 insertion(+) diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl index 57ded025..4f3409a9 100644 --- a/tcl/JobDB-Executive.tcl +++ b/tcl/JobDB-Executive.tcl @@ -55,6 +55,7 @@ proc job-set-status-unlocked {flight job st} { UPDATE jobs SET status=3D'$st' WHERE flight=3D$flight AND job=3D'$job' AND status<>'aborted' AND status<>'broken' + AND status<>'starved' " } =20 --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605181; cv=none; d=zoho.com; s=zohoarc; b=kmLU8GejAGOs3XXrZTr9qwAf5RieL+gZ8McNwdgDODsE++fz2Fj9Sw2aMNMGO81iI4kbWdNkl+tGjik1cw/O5hDhhC27Pw7KoLn6N9Sofovloq6Y8qmtbDo+atfKbgU5z0WfRChmvoiQjKdtOd5hTjmSH0OOU/n53eBUNMdkHZE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605181; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Le448xbJogc0RnECCDZprRC/QyJqTQ3jlw0LEjwTkKU=; b=DVfZBBeNKooK/0bLh2+LVpc20IbKK1NMSJy4BJHeRAXL35s8bznmJO/EXTAAzkU++ON3KKKSEkDnFMGsPjdK8Q9rB1GurHZETs5vaGbp+dpyFAJLxqBYeFg19l/WbYVmW0YytRPgrRabvS5jXqm3r7TUPkVkj0M/5h1z9zMW3+Y= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605181123222.06587434709218; Thu, 18 Apr 2019 09:33:01 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xQ-0002Ay-U9; Thu, 18 Apr 2019 16:32:16 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xP-00027g-64 for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:15 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 858c0478-61f7-11e9-8d3f-9f6ad06a8bc4; Thu, 18 Apr 2019 16:32:13 +0000 (UTC) X-Inumbo-ID: 858c0478-61f7-11e9-8d3f-9f6ad06a8bc4 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913797" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:52 +0100 Message-ID: <20190418163158.11408-16-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 15/21] starvation: Propagate starved job status into dependent jobs X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" If a build job is starved, then the same status (No jobs are marked `starved' yet.) Signed-off-by: Ian Jackson --- Osstest/JobDB/Executive.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm index 2e11c8f3..be5588fc 100644 --- a/Osstest/JobDB/Executive.pm +++ b/Osstest/JobDB/Executive.pm @@ -380,6 +380,8 @@ END } else { die "job $oflight.$ojob ($why) queued (we are $ourstatus)"; } + } elsif ($jstatus eq 'starved') { + broken("job $oflight.$ojob ($why) $jstatus", $jstatus); } else { broken("job $oflight.$ojob ($why) $jstatus", 'blocked'); } --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:14 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605200; cv=none; d=zoho.com; s=zohoarc; b=CtfrQhAlZt+PnaN2c+pMd+TvKdGc2v7TGQwLoLLF5SBX9Xq9EFRDpO6fWUFlvxldARB7/qx/C96d1Hynd9GBJCAk/rZ5aR3dHVDJMQ4yT58dZWCRxVts+XuzqFLvo++1+zxUQVjaK3orntS7fXXiA3n5DA2Dk1B9GH7WDVIWlbI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605200; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=yVz9n1A9J9Y4MQdkcxTzhF0Hmuxvdperu43vAsLNNLg=; b=PPKkRCNYvguZbmtsqJnx61tR10spI0tYylJ0/xrLtxOt5DNCbjJC5tusK02bIa+Jlx7CqTYd+DY8khpSs1ETz8Yyg2VgIqg6XB++DYNmA7epGcpJfX3o4oFuU1LdZpmlqtvMiDZApQo0W8ZKS+HDQgML1qdvzDr62JOqGOqFEgY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605200224805.5008480834217; Thu, 18 Apr 2019 09:33:20 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xM-00024I-Sa; Thu, 18 Apr 2019 16:32:12 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xK-00022D-W2 for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:11 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 8354c13e-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:10 +0000 (UTC) X-Inumbo-ID: 8354c13e-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913784" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:53 +0100 Message-ID: <20190418163158.11408-17-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 16/21] ts-host-allocate-Executive: Break out $now and add a newline X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Prep work, no functional change. Signed-off-by: Ian Jackson --- 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 3da138b1..3425c8ce 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -756,12 +756,14 @@ sub attempt_allocation { logm("host allocation: successful, reporting to planner."); } else { logm("host allocation: planned start in $best->{Start} seconds."); + my $maxwait =3D $r{hostalloc_maxwait_max}; + my $now =3D time // die $!; if (defined $maxwait) { # We quit if: # * we have been waiting at least $maxwait/2 # * we estimate it will take at least $maxwait overall - my $wait_sofar =3D (time // die $!) - $alloc_start_time; + my $wait_sofar =3D $now - $alloc_start_time; die "timed out: $wait_sofar, $best->{Start}, $maxwait" if $wait_sofar > $maxwait/2 && $wait_sofar + $best->{Start} > $maxwait; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:15 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605180; cv=none; d=zoho.com; s=zohoarc; b=BGpYhhrswYPyf5OeF64sXkAo7U+ABEWcW3NkKBOZYOgxrhcaXlDtj3vW+yLN285BKlvo0YsyD2gazxOYJKWtqjIH8h3BK7n3Ot2XH34kNNFmyBjEMM6g01cicIu73F8Fa6Kd9zUwjTs9UQFF9lW8DwrGT+4+Z0Mtsi0ImHB2lHE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605180; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=FXn3XrvYTAgVFPQ49Ywl+Cu3T+9sxNAoSAveQE7Xpa8=; b=QF4AfsDE3haDoSrfq29YV8i6g3rM8PNgrFA/MOsQIwW9BWcxSvokKkdy0NT6BE0PhdW310siP2CR30Z3iDAEOD6FwlkaRphwlGwcNlpar3/4P96RRIohjSjBERaNPlwUKR9JQetw7b0kg3WLGoXraLgIdJTJOmewiSX0/hTsSbQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605180685449.37263029005464; Thu, 18 Apr 2019 09:33:00 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xR-0002BY-9b; Thu, 18 Apr 2019 16:32:17 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xP-00028E-Jx for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:15 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 85b12970-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:14 +0000 (UTC) X-Inumbo-ID: 85b12970-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913798" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:54 +0100 Message-ID: <20190418163158.11408-18-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 17/21] starvation: Use "starved" for hostalloc_maxwait_max X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Previously this was "broken". We mustn't just call `broken' inside attempt_allocation because that runs in a db transaction. Instead, we arrange that attempt_allocation returns 2, which threads its way back out to the return value from alloc_resources, and then call broken there. Signed-off-by: Ian Jackson --- ts-hosts-allocate-Executive | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index 3425c8ce..8c9ddaf7 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -683,12 +683,17 @@ sub alloc_hosts () { ? -10000 : -10 * @hids; =20 - alloc_resources(WaitStart =3D> + my $ok =3D alloc_resources(WaitStart =3D> ($ENV{OSSTEST_RESOURCE_WAITSTART} || $fi->{started}), WaitStartAdjust =3D> $waitstartadjust, DebugFh =3D> \*DEBUG, \&attempt_allocation); =20 + if ($ok=3D=3D2) { + broken "starved or timed out", 'starved'; + } + die $ok unless $ok=3D=3D1; + foreach my $hid (@hids) { my $sel=3D $hid->{Selected}; die $hid->{Ident} unless defined $sel->{resname}; @@ -764,9 +769,11 @@ sub attempt_allocation { # * we have been waiting at least $maxwait/2 # * we estimate it will take at least $maxwait overall my $wait_sofar =3D $now - $alloc_start_time; - die "timed out: $wait_sofar, $best->{Start}, $maxwait" - if $wait_sofar > $maxwait/2 - && $wait_sofar + $best->{Start} > $maxwait; + if ($wait_sofar > $maxwait/2 + && $wait_sofar + $best->{Start} > $maxwait) { + logm "timed out: $wait_sofar, $best->{Start}, $maxwait"; + return 2; + } } } =20 --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:15 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605185; cv=none; d=zoho.com; s=zohoarc; b=XMF9KsYD5TDtIaN6mN5iJiWZD/8TbKhPMWDV0NNTDDJX59EPVHE7yrVLmwcfISORagTlMgCVHWOaORFXHnbEVOKgRkZlmzUl0Lc0cAy82uKkFFxxotOI9BVSMI6XA261Au9hMdt9UVFLKxMGANmF3rEUr5IsE9JwVFHNrKXUkgM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605185; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=xdJbHP5KwX7zddRZ1cPamZ3OKzu+aN7WA+EGN3ovFkY=; b=IBac6zpGgEVH+x8xu0MqeLJeaPhupIhkT7V605jFC9JDq4J360u1l0DSSFs9OrbPsFTpRbEotjsP9XotAhEviQARC5itgm+WiVTdWjNxS8CMKr56UZ/TN+Gj4mbgLu+NhsHpW5JCBrWGlHaYRKnk7ff0uX7FkSGowjbNp2KwqCs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605185764764.992376139467; Thu, 18 Apr 2019 09:33:05 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xS-0002Dj-64; Thu, 18 Apr 2019 16:32:18 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xP-00029D-Um for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:15 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 8631863e-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:15 +0000 (UTC) X-Inumbo-ID: 8631863e-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913801" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:55 +0100 Message-ID: <20190418163158.11408-19-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 18/21] starvation: Infrastructure for jobs which are delaying their flights X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Provide hostalloc_starvation_* in Osstest::Executive, and a comment saying what we are going to do. And provide a demo utility which prints the effect of some particular runvar value on a range of situations. Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 70 ++++++++++++++++++++++++++++++++++++++++= ++++ mg-hostalloc-starvation-demo | 53 +++++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100755 mg-hostalloc-starvation-demo diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index a9f9ac78..e741f529 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -22,6 +22,7 @@ use warnings; =20 use Osstest; =20 +use Carp; use POSIX; use IO::File; use File::Copy; @@ -55,6 +56,8 @@ BEGIN { alloc_resources alloc_resources_rollback_begin_work resource_check_allocated executive_resource_shared_mark_ready + hostalloc_starvation_parse_runvar + hostalloc_starvation_calculate_X duration_estimator db_pg_dsn opendb opendb_state db_schema_updates_applied db_schema_updates_intree @@ -1053,6 +1056,73 @@ END logm("$restype $resname shared $sharetype marked ready"); } =20 +# hostalloc_maxwait_starvation +# +# $r{hostalloc_maxwait_starvation} is either "never" or +# comma-separated list of assignments: +# =3D +# where is C, A, L or Xh and is +# a floating point number. +# +# terms: +# calculated or observed values: +# X wait factor, ratio between amount of time +# to allow for slow jobs, compared to other jobs +# W number of jobs waiting - strictly, jobs in states +# preparing queued running +# D number of jobs done - strictly, other states +# tuning parameters: +# Xt X when D=3D9 W=3D1, ie cancel one job out of ten +# Xh X when D=3D1 W=3D1, ie cancel one job out of two +# I length of time this expected delay must have +# persisted before we abandon this job +# C,A tuning parameters relating X to W and D (see below) +# +# we calculate: +# X =3D C + L * W^A / D^B +# where C, A are specified +# and L, B are calculated from C, A, Xh, Xt +# +# and then we are willing to allow each job to take +# X * (time spent for done jobs) + I +# +# default values are +# C =3D 1.3 +# A =3D 1 +# Xt =3D 5 +# Xh =3D 200 +# I =3D 3600 (seconds) + +sub hostalloc_starvation_parse_runvar ($) { + my ($r_hostalloc_maxwait_starvation) =3D @_; + # returns \%p hashref to be fed to hostalloc_starvation_calculate_X + # caller may inspect elements of %p + # if was `never' then !%p + $r_hostalloc_maxwait_starvation //=3D ''; + return { } if $r_hostalloc_maxwait_starvation eq 'never'; + my %p =3D ( C =3D> 1.3, A =3D> 1, Xt =3D> 5, Xh =3D> 200, I =3D> 3600 = ); + foreach (split /,/, $r_hostalloc_maxwait_starvation) { + m/=3D/ or die "$r_hostalloc_maxwait_starvation ?"; + exists($p{$`}) or die "$r_hostalloc_maxwait_starvation $` ?"; + $p{$`} =3D $' + 0.0; + } + # Xh =3D C + L * 1^A / 1^B =3D> L =3D Xh - C + # Xt =3D C + L * 1^A / 9^B + # Xt =3D C + (Xh - C) * 1^A / 9^B =3D> B =3D log_9[ Xh - C) / (Xt -= C) ] + $p{L} =3D $p{Xh} - $p{C}; + $p{B} =3D log(($p{Xh} - $p{C}) / ($p{Xt} - $p{C})) / log(9); + logm("hostalloc_maxwait_starvation: ". + join ' ', map { "$_=3D$p{$_}" } sort keys %p); + return \%p; +} + +sub hostalloc_starvation_calculate_X ($$$) { + my ($p, $W, $D) =3D @_; # =3D> X, undef meaning "forever" + return undef unless %$p and $D; + confess unless $W > 0 && $D > 0; + return $p->{C} + $p->{L} * $W**$p->{A} / $D**$p->{B}; +} + #---------- duration estimator ---------- =20 sub duration_estimator ($$;$$) { diff --git a/mg-hostalloc-starvation-demo b/mg-hostalloc-starvation-demo new file mode 100755 index 00000000..7944cc24 --- /dev/null +++ b/mg-hostalloc-starvation-demo @@ -0,0 +1,53 @@ +#!/usr/bin/perl -w + +use strict; +BEGIN { unshift @INC, qw(.); } + +use strict; +use POSIX; +use Osstest::Executive; +use Data::Dumper; + +die unless @ARGV>=3D1; + +our ($rv) =3D $ARGV[0]; # $r{hostalloc_starvation}; +shift @ARGV; + +my $p =3D hostalloc_starvation_parse_runvar($rv); + +my $l =3D 8; + +my @ts =3D qw(1 2 3 5 10 20 33 66 100 200 333); + +foreach my $w (qw(332 99 32 9 3 2 1)) { + printf "W=3D%3d |", $w; + foreach my $t (@ts) { + my $d =3D $t - $w; + print " | "; + if ($d <=3D 0) { + printf " %${l}s", ''; + } else { + my $x =3D hostalloc_starvation_calculate_X($p, $w, $d); + printf "%3d%% ", 100.0*$w/$t; + if (defined $x) { + printf "%${l}.2f", $x; + } else { + printf "%${l}s", 'never'; + } + } + } + print "\n"; +} + +print "\n"; +print " "; +foreach my $t (@ts) { + printf " | %${l}s", sprintf "T=3D%3d", $t; +} +print "\n"; + +foreach (@ARGV) { + m/,/ or die $!; + my $x =3D hostalloc_starvation_calculate_X($p, $', $`); + printf "D=3D%3d W=3D%3d X=3D%${l}.2f\n", $`, $', $x; +} --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:15 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605186; cv=none; d=zoho.com; s=zohoarc; b=YZUCFi3FKd/20UWQJyB3ycXI2Rlet8Z4XNf9SjCorLGi+5CvFIzGihMimPBIX84icZl9Zhvjr0+Z5oiLrEsjRzfSl39zBnUy+gWanKNgqdNqw3p0J+nXR3J4hhI4k5JGZWbaP58yOCXL84aNxJVsycHgklDPgTtaVIIPuXTrRtU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605186; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=nuSNzp/dkpD2uneUvJdzLrhZWuUkelROiawnsWwD3mY=; b=bq+D95960lKw3BLwcDMOOQzzV9cMJjaKz/6B2TV/g/QOVMwiXDhXK12mSAQ68dXF4SPNkTHZfGWcCfwVa+2F+brB+uSylAuZLFZ6oDKQssToegqaAm84DYISWwnfnncT+2aNaN0l4HS9D9g80BtDBP1gB/Rg+GkUFPHcNxOfNUg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605186377861.4513117930962; Thu, 18 Apr 2019 09:33:06 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xT-0002GS-Ji; Thu, 18 Apr 2019 16:32:19 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xR-0002C4-EH for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:17 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 866c7f9e-61f7-11e9-b3e8-bf25b6989550; Thu, 18 Apr 2019 16:32:15 +0000 (UTC) X-Inumbo-ID: 866c7f9e-61f7-11e9-b3e8-bf25b6989550 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913803" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:56 +0100 Message-ID: <20190418163158.11408-20-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 19/21] starvation: Abandon jobs which are unreasonably delaying their flight X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Sometimes, due to a shortage of available resources, a flight might be delayed because a handful of jobs are waiting much longer than the rest. Add a heuristic which causes these jobs to be abandoned. We consider ourselves starving if we are starving now, based on the most optimistic start time seen in the last I. Signed-off-by: Ian Jackson --- ts-hosts-allocate-Executive | 105 ++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 105 insertions(+) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index 8c9ddaf7..7ea3c4af 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -62,6 +62,8 @@ our %magictaskid; our $fi; our $jobinfo; our $harness_rev; +our $starvation_p; +our @abs_start_estimates; =20 #---------- general utilities, setup, etc. ---------- =20 @@ -114,12 +116,16 @@ END } =20 $alloc_start_time =3D time // die $!; + + $starvation_p =3D + hostalloc_starvation_parse_runvar($r{hostalloc_maxwait_starvation}); } =20 #---------- prepared sql statements ---------- # all users of these must ->finish them afterwards, to avoid db deadlock =20 our ($flagscheckq, $equivflagscheckq, $duration_estimator, $resprop_q, + $starvation_q, $alloc_findres_q, $alloc_shared_q, $alloc_sharing_slot_q, $claim_share_reuse_q, $claim_maxshare_q, $claim_rmshares_q, $claim_noshares_q, $claim_rmshare_q, $claim_setres_q, @@ -146,6 +152,15 @@ END AND name =3D ? END =20 + $starvation_q=3D $dbh_tests->prepare(<prepare(<{Start}. + # Returns the most optimistic absolute start time "in the last + # $period". Returns undef if we don't have good data yet. + + push @abs_start_estimates, { At =3D> $now, Got =3D> $best->{Start} + $= now }; + + # Actually, what we do is prune all but the last entry from before + # $period, and we expect at least 4 estimates. That ensures that + # the answer involves at least one estimate at least $period ago. + # Ie what we actually return is + # Consider the most recent estimate which is at least $period + # ago (the "oldest relevant"), and all subsequent estimates. + # Answer is the most optimistic start time of all of those, + # provided there are at least 4 of them. + my $is_old =3D sub { return $_[0]{At} <=3D $now - $period; }; + my $need_estimates =3D 4; + while (@abs_start_estimates > $need_estimates && + $is_old->($abs_start_estimates[1])) { + # estimates[1] is at least $period ago and more recent + # than $estimates[0], so $estimates[0] cannot be the + # oldest relevant and is indeed older than the oldest + # relevant. + shift @abs_start_estimates; + } + + my $pr =3D sub { + my ($e) =3D @_; + printf(DEBUG ' %s (@%s)', + $e->{Got} - $now, + $e->{At} - $now); + }; + + print DEBUG "most_optimistic: all:"; + my $optimist; + foreach (@abs_start_estimates) { + $pr->($_); + $optimist =3D $_ if !$optimist || $_->{Got} < $optimist->{Got}; + } + print DEBUG "\n"; + printf(DEBUG "most_optimistic: (period=3D%s):", $period); + $pr->($optimist); + print DEBUG "\n"; + + return undef unless @abs_start_estimates >=3D $need_estimates; + + return $optimist->{Got}; +} + +sub starving ($) { + my ($best_start_abs) =3D @_; + return (0, 'runvar says never give up') unless %$starvation_p; + return (0, 'no estimate') unless defined $best_start_abs; + $starvation_q->execute($flight); + my $d=3D0; + my $w=3D0; + my $maxfin=3D0; + while (my ($j,$st,$fin) =3D $starvation_q->fetchrow_array()) { + if ($st eq 'preparing' || + $st eq 'queued' || + $st eq 'running') { + $w++; + } else { + $d++; + return (0, "job $j status $st but no step finished time!") + unless defined $fin; + $maxfin =3D $fin if $fin > $maxfin; + } + } + # we quit if the total time from the start of the flight + # to our expected finish is more than the total time so + # far (for the completed jobs) by the margin X and I + my $X =3D hostalloc_starvation_calculate_X($starvation_p, $w, $d); + return (0, 'X=3Dinf') unless defined $X; + my $total_d =3D $maxfin - $fi->{started}; + my $projected_me =3D $best_start_abs - $fi->{started}; + my $m =3D "D=3D$d W=3D$w X=3D$X maxfin=3D$maxfin"; + my $bad =3D $projected_me > $X * $total_d + $starvation_p->{I}; + return ($bad, $m); +} + sub attempt_allocation { my $mayalloc; ($plan, $mayalloc) =3D @_; @@ -772,6 +869,14 @@ sub attempt_allocation { if ($wait_sofar > $maxwait/2 && $wait_sofar + $best->{Start} > $maxwait) { logm "timed out: $wait_sofar, $best->{Start}, $maxwait"; + } elsif (%$starvation_p) { + my $est_abs =3D most_optimistic($best, $now, $starvation_p->{I}); + my ($starving, $m) =3D starving($est_abs); + $starvation_q->finish(); + if (!$starving) { + print DEBUG "not starving: $m\n"; + } else { + logm "starving ($m)"; return 2; } } --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:15 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605205; cv=none; d=zoho.com; s=zohoarc; b=Zhbcxnggb+7qI0OwEWy0A/VMVaJcpfiUd3YuTzLEQYM+Q6n+hXsBztgJEbAxMzCOPVrnwwgZpzt7wvFo1rY0A2LZxmL5OBuLkCBWYYGeuUxyMQRN0oYGEGGU09N6d/2sJYqg7QiJbkNnYQScAu5F3vC9O/T3R8C7EE8zBeFYawg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605205; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=cm8vSSCs8/Z1RGyCXz+Gt5xnP9brhQwiQAdLZ/x4Ea8=; b=cOCY6AgI4mUfDDAt8hm66xTi7SxUMF6pata2U3BzaH9t4jsWszsLR4EuNiCKqPMnG9YZYG3dxarUthscVj2UBDNx7gqiDLsXcLwAG2gQzC9TPuxQtvcek/nlaB78y3/D+W4o2Fp9nlSMfIk8yon0t58cXgIXmtXwp0stiFpaN6E= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605205221755.3525139815713; Thu, 18 Apr 2019 09:33:25 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xP-00029C-Q1; Thu, 18 Apr 2019 16:32:15 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xN-000268-UX for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:13 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 843157fe-61f7-11e9-a093-d366d8b4972d; Thu, 18 Apr 2019 16:32:11 +0000 (UTC) X-Inumbo-ID: 843157fe-61f7-11e9-a093-d366d8b4972d X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913789" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:57 +0100 Message-ID: <20190418163158.11408-21-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 20/21] hostalloc_maxwait_max: Use starvation most_optimistic X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Now that we have a more sophisticated estimate of our likely scheduled time, use it here too. Signed-off-by: Ian Jackson --- ts-hosts-allocate-Executive | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index 7ea3c4af..b75927c1 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -865,10 +865,15 @@ sub attempt_allocation { # We quit if: # * we have been waiting at least $maxwait/2 # * we estimate it will take at least $maxwait overall - my $wait_sofar =3D $now - $alloc_start_time; - if ($wait_sofar > $maxwait/2 - && $wait_sofar + $best->{Start} > $maxwait) { - logm "timed out: $wait_sofar, $best->{Start}, $maxwait"; + my $est_abs =3D most_optimistic($best, $now, $maxwait/2); + if (defined $est_abs) { + my $wait_sofar =3D $now - $alloc_start_time; + my $wait_exp =3D $est_abs - $alloc_start_time; + if ($wait_exp > $maxwait) { + logm "timed out: $wait_exp > $maxwait ($wait_sofar)", + return 2; + } + } } elsif (%$starvation_p) { my $est_abs =3D most_optimistic($best, $now, $starvation_p->{I}); my ($starving, $m) =3D starving($est_abs); --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel From nobody Thu May 2 23:34:15 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605177; cv=none; d=zoho.com; s=zohoarc; b=DPe5FTbGbUQvgMAuqViMx89g2T4JbXgEFJ3m1csAs9v4so+RDOHyT8oPFfAltymRypcEbObNIeYpg/L++lwH0PYjoaqY6cffP7HUggM8Dkf6vcSkwvIGcdS1MD2AzuuBzPUVD/uaMr1a2H4LeUWn4OY2jWQeLuCSVMJMa9+MzCI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605177; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=J6kv7PThOSkPoqcqpq18ourK08O2jLkC+KSYyC1l9ro=; b=X6Fds/pHMpoYjvxxyXDtAS7nHIm1wsUsJMMAq76f87N2NZ9AeAwxEfASkfQOypqCBjfcKuxxkFsuuruzR4H1sv2hC/Gupeip3Al8RPV4ivvLCowMt1Tvviyfj8E/hUw5IB2vFkCRVWiUEGImCGlQs3M5vI38wKYz/hRU7YgnDUs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1555605177727109.29143754911809; Thu, 18 Apr 2019 09:32:57 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xU-0002HC-2I; Thu, 18 Apr 2019 16:32:20 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xR-0002C3-E8 for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:17 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 86a2232e-61f7-11e9-8634-4356937a26ca; Thu, 18 Apr 2019 16:32:16 +0000 (UTC) X-Inumbo-ID: 86a2232e-61f7-11e9-8634-4356937a26ca X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913807" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:58 +0100 Message-ID: <20190418163158.11408-22-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 21/21] starvation: Better logging/debugging output X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Signed-off-by: Ian Jackson --- ts-hosts-allocate-Executive | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive index b75927c1..64c4c9f9 100755 --- a/ts-hosts-allocate-Executive +++ b/ts-hosts-allocate-Executive @@ -777,8 +777,8 @@ sub most_optimistic ($$$) { return $optimist->{Got}; } =20 -sub starving ($) { - my ($best_start_abs) =3D @_; +sub starving ($$) { + my ($best_start_abs, $now) =3D @_; return (0, 'runvar says never give up') unless %$starvation_p; return (0, 'no estimate') unless defined $best_start_abs; $starvation_q->execute($flight); @@ -801,11 +801,16 @@ sub starving ($) { # to our expected finish is more than the total time so # far (for the completed jobs) by the margin X and I my $X =3D hostalloc_starvation_calculate_X($starvation_p, $w, $d); - return (0, 'X=3Dinf') unless defined $X; + return (0, "D=3D$d W=3D$w X=3Dinf") unless defined $X; my $total_d =3D $maxfin - $fi->{started}; my $projected_me =3D $best_start_abs - $fi->{started}; - my $m =3D "D=3D$d W=3D$w X=3D$X maxfin=3D$maxfin"; - my $bad =3D $projected_me > $X * $total_d + $starvation_p->{I}; + my $lim =3D $X * $total_d + $starvation_p->{I}; + my $Xcmp =3D ($projected_me - $starvation_p->{I}) / $total_d; + my $m =3D sprintf + "D=3D%d W=3D%d X=3D%.3f t_D=3D%s t_me=3D%s t_lim=3D%.3f X'=3D%.4f (fi.s= =3D%s)", + $d, $w, $X, $total_d, $projected_me, $lim, $Xcmp, + $fi->{started} - $now; + my $bad =3D $projected_me > $lim; return ($bad, $m); } =20 @@ -876,7 +881,7 @@ sub attempt_allocation { } } elsif (%$starvation_p) { my $est_abs =3D most_optimistic($best, $now, $starvation_p->{I}); - my ($starving, $m) =3D starving($est_abs); + my ($starving, $m) =3D starving($est_abs, $now); $starvation_q->finish(); if (!$starving) { print DEBUG "not starving: $m\n"; --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel