- Timestamp:
- Apr 21, 2014, 5:42:34 AM (12 years ago)
- Location:
- branches/eam_branches/ps2-tc3-20130727
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
pstamp/scripts (modified) (1 prop)
-
pstamp/scripts/pstamp_checkdependent.pl (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ps2-tc3-20130727
- Property svn:mergeinfo changed
-
branches/eam_branches/ps2-tc3-20130727/pstamp/scripts
- Property svn:mergeinfo deleted
-
branches/eam_branches/ps2-tc3-20130727/pstamp/scripts/pstamp_checkdependent.pl
r35827 r36680 27 27 my $IPP_DIFF_MODE_STACK_STACK = 4; 28 28 29 my ($dep_id, $stage, $stage_id, $component, $imagedb, $ rlabel, $need_magic, $fault_count, $max_fault_count, $logfile);29 my ($dep_id, $stage, $stage_id, $component, $imagedb, $label, $rlabel, $need_magic, $fault_count, $max_fault_count, $logfile); 30 30 my ($dbname, $ps_dbserver, $verbose, $save_temps, $no_update); 31 31 … … 36 36 'component=s' => \$component, 37 37 'imagedb=s' => \$imagedb, # dbname for images lookups. 38 'rlabel=s' => \$rlabel, 38 'label=s' => \$label, # request's label 39 'rlabel=s' => \$rlabel, # pstampDependent.rlabel (deprecated) 39 40 'need_magic' => \$need_magic, 40 41 'fault_count=i' => \$fault_count, … … 73 74 } 74 75 76 if ($label) { 77 # rlabel is deprecated. Use one based on the supplied label parameter which is the current label 78 # for the request, which may be different than the one given to the dependent when the job was parsed. 79 # XXX: having the convention that update label is 'ps_ud_' . $label of request embedded here 80 # (and formerly in pstampparse.pl) is not particularly clean but it's simple. 81 my $new_rlabel = 'ps_ud_' . $label; 82 if ($new_rlabel ne $rlabel) { 83 print "Notice: using $new_rlabel instead of $rlabel for update label.\n"; 84 $rlabel = $new_rlabel; 85 } 86 } 87 88 75 89 if (!$ps_dbserver) { 76 90 $ps_dbserver = metadataLookupStr($ipprc->{_siteConfig}, 'PS_DBSERVER'); … … 304 318 } 305 319 $queued_update = 1; 320 } elsif ($chip->{state} eq 'cleaned' and $chip->{data_state} eq 'update') { 321 # we've had a number of runs in this limbo state 322 323 my $command = "$chiptool -updaterun -set_state update -chip_id $chip_id"; 324 $command .= " -set_label $rlabel" if $rlabel; 325 326 if (!$no_update) { 327 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 328 run(command => $command, verbose => $verbose); 329 unless ($success) { 330 my_die("failed to change ${stage}Run $stage_id $component from goto_cleaned to update", $PS_EXIT_UNKNOWN_ERROR); 331 } 332 } else { 333 print "skipping $command\n"; 334 } 335 $queued_update = 1; 306 336 } elsif ($chip->{fault}) { 307 337 $fault_count++; … … 438 468 $chips_ready = 0; 439 469 $chip->{fault} = $chip->{chip_fault}; 470 $chip->{data_group} = $chip->{chip_data_group}; 440 471 push @chipsToUpdate, $chip; 441 472 } else { … … 459 490 print "skipping $command\n"; 460 491 } 492 } elsif ($chips_ready and $skycell->{data_state} eq 'update' and $skycell->{state} ne 'update') { 493 my $command = "$warptool -updaterun -warp_id $warp_id -set_state update"; 494 $command .= " -set_label $rlabel" if $rlabel; 495 496 if (!$no_update) { 497 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 498 run(command => $command, verbose => $verbose); 499 unless ($success) { 500 my_die("failed to change state of ${stage}Run $stage_id to update", $PS_EXIT_UNKNOWN_ERROR); 501 } 502 } else { 503 print "skipping $command\n"; 504 } 505 461 506 } elsif (scalar @chipsToUpdate > 0) { 462 507 my $fault = check_states_chip($chip_id, \@chipsToUpdate, $rlabel, $need_magic); … … 528 573 } 529 574 return $warp_status; 575 } elsif ($warp->{quality} != 0) { 576 print STDERR "input warp has quality error\n"; 577 faultComponent('diff', $diff_id, $skycell_id, $PSTAMP_GONE); 578 return $PSTAMP_GONE; 530 579 } 531 580 # warps are ready fall through and queue the diff update … … 575 624 } elsif ($diff_mode == $IPP_DIFF_MODE_STACK_STACK ) { 576 625 # check the state of the input stack 577 my $command = "$stacktool -sumskyfile -stack_id $skycell->{stack 2}";626 my $command = "$stacktool -sumskyfile -stack_id $skycell->{stack1}"; 578 627 my $stack1 = runToolAndParseExpectOne($command, $verbose); 579 my_die("failed to find stackSumSkyfile for stack_id $skycell->{stack 2}", $PS_EXIT_UNKNOWN_ERROR) if !$stack1;628 my_die("failed to find stackSumSkyfile for stack_id $skycell->{stack1}", $PS_EXIT_UNKNOWN_ERROR) if !$stack1; 580 629 581 630 if ($stack1->{state} ne 'full') { 582 print STDERR "input stack for diffRun $diff_id $skycell_id is not in full state faulting jobs\n";631 print STDERR "input stack $skycell->{stack1} for diffRun $diff_id $skycell_id is not in full state faulting jobs\n"; 583 632 faultComponent('diff', $diff_id, $skycell_id, $PSTAMP_GONE); 584 633 return $PSTAMP_GONE; … … 590 639 591 640 if ($stack2->{state} ne 'full') { 592 print STDERR "template stack for diffRun $diff_id $skycell_id is not in full state faulting jobs\n";641 print STDERR "template stack $skycell->{stack2} for diffRun $diff_id $skycell_id is not in full state faulting jobs\n"; 593 642 faultComponent('diff', $diff_id, $skycell_id, $PSTAMP_GONE); 594 643 return $PSTAMP_GONE;
Note:
See TracChangeset
for help on using the changeset viewer.
