From cf5c81d7cc4da613d3a0e204cc191f1a02a090ff Mon Sep 17 00:00:00 2001 From: Leigh B Stoller Date: Mon, 30 Oct 2017 10:54:26 -0600 Subject: [PATCH] More work on mapper error processing, try to find the output from tyhe last run of assign, which is especially important on the moonshot cluster which is multi-architecture. --- protogeni/lib/GeniCM.pm.in | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/protogeni/lib/GeniCM.pm.in b/protogeni/lib/GeniCM.pm.in index 26e7fd103..8fd61588f 100755 --- a/protogeni/lib/GeniCM.pm.in +++ b/protogeni/lib/GeniCM.pm.in @@ -2913,6 +2913,7 @@ sub GetTicketAuxAux($$$$$$$$$$$) $output = GeniUtil::ExecQuiet("$MAPPER -a -d -v $aopts -z -o $tmpfile $pid $eid"); if ($?) { + my $done = 0; my $logstuff = ""; my $errorstr = ""; my $solution; @@ -2953,16 +2954,16 @@ sub GetTicketAuxAux($$$$$$$$$$$) # # The assign_wrapper2 script wraps assign, and basically # prints a bunch of stuff a second time. But it helpfully - # print a tag line we can watch for. We can stop parsing - # when we see it. - # - last - if ($line =~ /^ASSIGN FAILED/); + # print a tag line we can watch for. Now we can ignore + # anything until we see another assign exit statement, which + # means we ran assign multiple times. + if ($line =~ /^ASSIGN FAILED/) { + $done = 1; + next; + } - # Want just the first set of violations / solution / precheck. - if (!defined($precheck) && $line =~ /precheck:$/) { + if ($line =~ /precheck:$/) { $inprecheck = 1; - $precheck = ""; # Eat the line. next; } -- GitLab