Changeset 29612 for trunk/pstamp/scripts/pstamp_checkdependent.pl
- Timestamp:
- Oct 29, 2010, 2:55:09 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_checkdependent.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_checkdependent.pl
r29579 r29612 304 304 305 305 my $warp_id = $metadata->{warp_id}; 306 my $skycell_id = $metadata->{skycell_id}; 306 307 my $state = $metadata->{state}; 307 if (($state =~ /error/) or ($state =~ /purged/) or ($state =~ /scrubbed/) or ($state eq 'drop')) { 308 print STDERR "warpRun $warp_id has state $state faulting jobs\n"; 308 my $data_state = $metadata->{data_state}; 309 if (($state =~ /error/) or ($state =~ /purged/) or ($state =~ /scrubbed/) or ($state eq 'drop') or 310 ($data_state =~ /error/) or ($data_state =~ /purged/) or ($data_state =~ /scrubbed/)) { 311 print STDERR "warpRun $warp_id $skycell_id has state $state $data_state faulting jobs\n"; 309 312 faultJobs('stop', undef, undef, $PSTAMP_GONE); 310 313 exit 0; 314 } 315 if (($state eq 'update') and ($metadata->{fault})) { 316 # fault dependent. 317 my $fault = $metadata->{fault}; 318 my_die("warp $warp_id $skycell_id faulted: $fault", $fault); 311 319 } 312 320 … … 316 324 317 325 my $command = "$warptool -scmap -warp_id $warp_id -skycell_id $skycell_id"; 318 my $data = runToolAndParse ($command, $verbose);326 my $data = runToolAndParseExpectOne($command, $verbose); 319 327 if (!$data or scalar @$data == 0) { 320 328 # This happens if the chipProcessedImfile disappears which happened when earlier … … 671 679 } elsif (($dsRun_state eq 'cleaned') or ($dsRun_state eq 'update')) { 672 680 foreach my $c (@$components) { 673 my $command = "$magicdstool -setfiletoupdate -magic_ds_id $magic_ds_id -component $c"; 674 $command .= " -set_label $rlabel" if $rlabel; 675 if (!$no_update) { 676 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 677 run(command => $command, verbose => $verbose); 678 unless ($success) { 679 my_die("failed to set destreaked component to 'update' for ${stage}Run $stage_id $c", 680 $PS_EXIT_UNKNOWN_ERROR); 681 my $command = "$magicdstool -destreakedfile -magic_ds_id $magic_ds_id -component $c"; 682 my $dsfile = runToolAndParseExpectOne($command, $verbose); 683 if (!$dsfile) { 684 my_die("failed to find magicDSFile for ${stage}Run $stage_id $c", $PS_EXIT_UNKNOWN_ERROR); 685 } 686 if ($dsfile->{fault} > 0) { 687 my_die("faulted magicDSFile for ${stage}Run $stage_id $c fault: $dsfile->{fault}", 688 $PS_EXIT_UNKNOWN_ERROR); 689 } 690 if ($dsfile->{data_state} eq 'cleaned') { 691 $command = "$magicdstool -setfiletoupdate -magic_ds_id $magic_ds_id -component $c"; 692 $command .= " -set_label $rlabel" if $rlabel; 693 if (!$no_update) { 694 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 695 run(command => $command, verbose => $verbose); 696 unless ($success) { 697 my_die("failed to set destreaked component to 'update' for ${stage}Run $stage_id $c", 698 $PS_EXIT_UNKNOWN_ERROR); 699 } 700 } else { 701 print "skipping $command\n"; 681 702 } 682 703 } else { 683 print " skipping $command\n";704 print "magicDSFile for ${stage}Run $stage_id $c data_state: $dsfile->{data_state}\n"; 684 705 } 685 706 }
Note:
See TracChangeset
for help on using the changeset viewer.
