Changeset 27853 for trunk/pstamp/scripts/pstamp_checkdependent.pl
- Timestamp:
- May 4, 2010, 10:02:05 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_checkdependent.pl (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_checkdependent.pl
r27805 r27853 30 30 'stage_id=i' => \$stage_id, 31 31 'component=s' => \$component, 32 'imagedb=s' => \$imagedb, # dbname for images 32 'imagedb=s' => \$imagedb, # dbname for images. 33 33 'rlabel=s' => \$rlabel, 34 34 'need_magic' => \$need_magic, … … 56 56 } 57 57 58 # Append imagedb to the ippTools 58 59 $chiptool .= " -dbname $imagedb"; 59 60 $warptool .= " -dbname $imagedb"; 60 61 $difftool .= " -dbname $imagedb"; 62 $stacktool .= " -dbname $imagedb"; 61 63 $magicdstool .= " -dbname $imagedb"; 62 63 64 64 65 my $ipprc = PS::IPP::Config->new(); … … 67 68 $dbserver = metadataLookupStr($ipprc->{_siteConfig}, 'PS_DBSERVER'); 68 69 } 69 70 70 71 71 … … 107 107 and (!$need_magic or $it->{magicked} > 0)) { 108 108 109 # This Dependency is satisfied. all done109 # This Dependency is satisfied. All done! 110 110 my $command = "$pstamptool -updatedependent -set_state full -dep_id $dep_id"; 111 111 $command .= " -dbname $dbname" if $dbname; … … 142 142 } 143 143 } else { 144 # update for this component has been queued by hasn't completed yet 144 # update for this component has been queued by hasn't completed yet or the state is an error state 145 145 # XXX: in this state we aren't checking the dependents anymore. If something goes wrong this 146 146 # will never complete. Consider calling the 'queue_update' functions again just to check. They are relatively cheap … … 157 157 158 158 # temporary hack to deal with data with old burntool tables. This check is now done by pstampparse.pl 159 # so runs in this state willnot get queued159 # so runs in this state should not get queued 160 160 if ($stage eq 'chip') { 161 161 my $burntool_state = $it->{burntool_state}; … … 177 177 if (!$job_fault and ($stage eq 'chip')) { 178 178 # chip processing is done, start destreaking. 179 $job_fault = queue_update_magicDSRun($stage, $stage_id, $rlabel, $ it->{raw_magicked}, $it->{dsRun_state});179 $job_fault = queue_update_magicDSRun($stage, $stage_id, $rlabel, $need_magic, $it->{raw_magicked}, $it->{dsRun_state}); 180 180 } 181 181 if ($job_fault) { … … 194 194 my $need_magic = shift; 195 195 196 196 197 my $dsRun_state; 197 198 my $raw_all_magicked = 1; # this gets cleared if any of the inputs aren't destreaked … … 201 202 $raw_all_magicked &= ($chip->{raw_magicked} > 0); 202 203 203 if ($chip->{data_state} ne 'update') { 204 if ($chip->{state} =~ /error/) { 205 faultJobs('stop', undef, undef, $PSTAMP_GONE); 206 } elsif (($chip->{data_state} ne 'update') and ($chip->{data_state} ne 'full')) { 204 207 my $command = "$chiptool -setimfiletoupdate -chip_id $chip_id -class_id $chip->{class_id}"; 205 208 $command .= " -set_label $rlabel" if $rlabel; … … 236 239 } 237 240 238 my $status = queue_update_magicDSRun('chip', $chip_id, $rlabel, $ raw_all_magicked, $dsRun_state);241 my $status = queue_update_magicDSRun('chip', $chip_id, $rlabel, $need_magic, $raw_all_magicked, $dsRun_state); 239 242 240 243 return $status; … … 255 258 256 259 my $warp_id = $metadata->{warp_id}; 260 my $state = $metadata->{state}; 261 if ($state =~ /error/) { 262 print STDERR "warpRun $warp_id has state $state faulting jobs\n"; 263 faultJobs('stop', undef, undef, $PSTAMP_GONE); 264 exit 0; 265 } 266 257 267 if (!$whole_run) { 258 268 my $skycell = $metadata; … … 584 594 my $stage_id = shift; 585 595 my $rlabel = shift; 596 my $need_magic = shift; 586 597 my $input_magicked = shift; 587 598 my $dsRun_state = shift; 588 599 589 # XXX: this code is only fully coded and tested forchip stage600 # XXX: this code assumes that destreaking is handled at the chip stage 590 601 my_die ("queue_update_magicDSRun only works for stage chip", $PS_EXIT_PROG_ERROR) if $stage ne 'chip'; 591 602 … … 613 624 print "skipping $command\n"; 614 625 } 626 } elsif ($dsRun_state eq 'failed_revert') { 627 print "magicDSRun.state = $dsRun_state for chipRun $stage_id is in state failed_revert cannot update"; 628 faultJobs('stop', undef, undef, $PSTAMP_NOT_AVAILABLE); 615 629 } else { 616 630 print "magicDSRun.state = $dsRun_state for chipRun $stage_id";
Note:
See TracChangeset
for help on using the changeset viewer.
