From patchwork Mon Jan 4 16:49:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 7948691 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D1AE09F350 for ; Mon, 4 Jan 2016 16:51:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EDCB22035D for ; Mon, 4 Jan 2016 16:51:44 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0D7F32012D for ; Mon, 4 Jan 2016 16:51:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aG8KP-0003W9-Nd; Mon, 04 Jan 2016 16:49:53 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aG8KO-0003VL-F1 for xen-devel@lists.xenproject.org; Mon, 04 Jan 2016 16:49:52 +0000 Received: from [85.158.139.211] by server-5.bemta-5.messagelabs.com id EE/66-03235-FA2AA865; Mon, 04 Jan 2016 16:49:51 +0000 X-Env-Sender: prvs=80467dea4=Ian.Jackson@citrix.com X-Msg-Ref: server-14.tower-206.messagelabs.com!1451926189!13555869!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30360 invoked from network); 4 Jan 2016 16:49:51 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-14.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 4 Jan 2016 16:49:51 -0000 X-IronPort-AV: E=Sophos;i="5.20,521,1444694400"; d="scan'208,217";a="322764708" From: Ian Jackson To: Date: Mon, 4 Jan 2016 16:49:38 +0000 Message-ID: <1451926178-10812-3-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1451926178-10812-1-git-send-email-ian.jackson@eu.citrix.com> References: <1451926178-10812-1-git-send-email-ian.jackson@eu.citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Jackson , Ian Campbell Subject: [Xen-devel] [OSSTEST PATCH 2/2] ms-* html generation: Provide right title for projection X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When ms-queuedaemon generates a resource-projection.html, it sometimes does so from data-plan.pl (see proc report-plan). This means that ms-planner does not get a reliable indication of whether it is being run for the plan or the projection, and the resource-project.html sometimes claims to be the plan. Fix with a new ms-planner option -W which tells it what to put in the title, defaulting to the value passed to -w. DEPLOYMENT NOTE: The new ms-planner works with the old queuedaemon, so when upgrading, it is OK to simply update the daemons-testing.git and then restart the ms-queuedaemon. If it is necessary to downgrade, rewinding to the old commit with a running ms-queuedaemon will cause errors from the old ms-planner being passed -w -- but these errors are trapped and ignored. So in this case reports will be out of datte until ms-queuedaemon is also restarted. In either case nothing will go badly wrong. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- ms-planner | 7 ++++++- ms-queuedaemon | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ms-planner b/ms-planner index 7ce0405..6f4a511 100755 --- a/ms-planner +++ b/ms-planner @@ -34,6 +34,7 @@ use Osstest::Executive; open DEBUG, ">/dev/null" or die $!; our $walker = 'plan'; +our $walker_show; while (@ARGV and $ARGV[0] =~ m/^-/) { $_= shift @ARGV; @@ -43,12 +44,16 @@ while (@ARGV and $ARGV[0] =~ m/^-/) { open DEBUG, ">&STDERR" or die $!; } elsif (s/^-w(.+)/-/) { $walker = $1; + } elsif (s/^-W(.+)/-/) { + $walker_show = $1; } else { die "$_ ?"; } } } +$walker_show //= $walker; + csreadconfig(); our ($plan); @@ -688,7 +693,7 @@ sub cmd_show_html () { # Dumper(\@rows, \@newoutcols); printf "Resource %s - %s\n", - $walker, ($c{DnsDomain} // '?'); + $walker_show, ($c{DnsDomain} // '?'); printf "\n", show_rel_time($now); diff --git a/ms-queuedaemon b/ms-queuedaemon index 08f88cf..2b8d621 100755 --- a/ms-queuedaemon +++ b/ms-queuedaemon @@ -301,7 +301,7 @@ proc report-plan {w wo} { global c catching-internally "showing $w html" { set outputfile "$c(WebspaceFile)/resource-$wo.html" - exec ./ms-planner -w$w show-html > $outputfile + exec ./ms-planner -w$w -W$wo show-html > $outputfile } { set out data-$wo.final.pl file copy -force data-$w.pl $out.new
plan age %sreport at %s