IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28145


Ignore:
Timestamp:
May 27, 2010, 1:21:34 PM (16 years ago)
Author:
bills
Message:

workaround for the problem described in ticket 1388. If a dependent faults in such
a way that the dependency can never be satisified don't create any more jobs that depends on it.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/pstamptool_getdependent.sql

    r27856 r28145  
    11SELECT DISTINCT pstampDependent.*
    22FROM pstampDependent
    3 -- JOIN pstampJob USING(dep_id)
    4 -- JOIN pstampRequest USING(req_id)
    53WHERE pstampDependent.state = 'new'
  • trunk/ippTools/src/pstamptool.c

    r28106 r28145  
    11361136            return false;
    11371137        }
     1138        psS32 fault = psMetadataLookupS64(NULL, dep, "fault");
     1139        if (fault > 0) {
     1140            fprintf(stderr, "existing dependent has fault %d\n", fault);
     1141            exit (fault);
     1142        }
    11381143        printf("%" PRId64 "\n", dep_id);
    11391144        psFree(output);
  • trunk/pstamp/scripts/pstamp_checkdependent.pl

    r28134 r28145  
    307307            # ... and fault the dependent so that we have a record of the error
    308308            my_die("failed to find warpSkyCelllMap for warpRun $warp_id skycell_id $skycell_id",
    309                 $PS_EXIT_DATA_ERROR);
     309                $PSTAMP_GONE);
    310310        }
    311311
  • trunk/pstamp/scripts/pstampparse.pl

    r28081 r28145  
    829829            run(command => $command, verbose => $verbose);
    830830        unless ($success) {
    831             my_die("$command failed", $PS_EXIT_UNKNOWN_ERROR);
    832         }
    833         my $output = join "", @$stdout_buf;
    834         chomp $output;
    835         $dep_id = $output;
    836         #
    837         # XXX: need to fault the request or something
    838         my_die("pstamptool -getdependent returned invalid dep_id", $PS_EXIT_PROG_ERROR) if !$dep_id;
     831            my $fault = $error_code >> 8;
     832            print STDERR "$command failed with fault $fault\n";
     833            if ($fault >= 10) {
     834                $$r_dep_id = 0;
     835                $$r_fault = $fault;
     836                $$r_jobState = 'stop';
     837                return;
     838            }
     839            # for now just die. Later pstamptool will return the whole dependent so we can
     840            # examine the fault code
     841            my_die("$command failed with unexpected fault value: $fault", $PS_EXIT_UNKNOWN_ERROR);
     842        } else {
     843            my $output = join "", @$stdout_buf;
     844            chomp $output;
     845            $dep_id = $output;
     846            #
     847            # XXX: need to fault the request or something
     848            my_die("pstamptool -getdependent returned invalid dep_id", $PS_EXIT_PROG_ERROR) if !$dep_id;
     849        }
    839850    } else {
    840851        print STDERR "skipping $command\n";
Note: See TracChangeset for help on using the changeset viewer.