Changeset 37267
- Timestamp:
- Aug 19, 2014, 1:07:16 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-pv3-20140717/ippScripts/scripts/sc_retry_return.pl
r37266 r37267 166 166 } 167 167 168 open(DBF,"$file") || warn "Missing file $file\n"; 169 my $cmd = <DBF>; 170 close(DBF); 171 172 chomp($cmd); 173 174 $cmd =~ s/-/ -/g; # This is just a safety check for missing space. 175 if ($cmd == "") { 176 print STDERR "empty dbinfo file for $stage_id, $class_id, skipping\n"; 177 next; 178 } 179 180 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 181 run(command => $cmd, verbose => $verbose); 182 unless ($success) { 183 # This shouldn't fail, but we also can't suddenly abort if something does fail. 184 # Now we're going to drop the component that owns this dbinfo, which should force a retry. 185 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 186 warn("The command that shouldn't fail has failed: $file $cmd $remote_id $error_code"); 187 if ($poll_word ne 'Completed') { # If the job claims it completed, then we're fighting the network. 188 # drop_component($remote_id,$cmd,$file); 189 print STDERR "we should drop this component: $cmd\n"; 190 } 168 { 169 open(DBF,"$file") || warn "Missing file $file\n"; 170 my $cmd = <DBF>; 171 close(DBF); 172 173 chomp($cmd); 174 175 $cmd =~ s/-/ -/g; # This is just a safety check for missing space. 176 if ($cmd == "") { 177 print STDERR "empty dbinfo file for $stage_id, $class_id, skipping\n"; 178 next; 179 } 180 181 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 182 run(command => $cmd, verbose => $verbose); 183 unless ($success) { 184 # This shouldn't fail, but we also can't suddenly abort if something does fail. 185 # Now we're going to drop the component that owns this dbinfo, which should force a retry. 186 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 187 warn("The command that shouldn't fail has failed: $file $cmd $remote_id $error_code"); 188 if ($poll_word ne 'Completed') { # If the job claims it completed, then we're fighting the network. 189 # drop_component($remote_id,$cmd,$file); 190 print STDERR "we should drop this component: $cmd\n"; 191 } 192 } 191 193 } 192 194 }
Note:
See TracChangeset
for help on using the changeset viewer.
