IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 6, 2009, 9:54:56 AM (17 years ago)
Author:
bills
Message:

set outdir for faulted distComponents so that we can find what host the log file is on.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/dist_component.pl

    r26044 r26049  
    106106    unless ($success) {
    107107        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    108         &my_die("Unable to perform $command: $error_code", $dist_id, $component, $error_code);
     108        &my_die("Unable to perform $command: $error_code", $dist_id, $component, $outdir, $error_code);
    109109    }
    110110
    111     open $rf, "<$rf_name" or &my_die("failed to open results file $rf_name", $dist_id, $component, $PS_EXIT_UNKNOWN_ERROR);
     111    open $rf, "<$rf_name" or &my_die("failed to open results file $rf_name", $dist_id, $component, $outdir, $PS_EXIT_UNKNOWN_ERROR);
    112112
    113113    my @lines = (<$rf>);
    114114
    115115    my $metadata = $mdcParser->parse (join "", @lines) or
    116         &my_die("Unable to parse metadata config doc", $dist_id, $component, $PS_EXIT_PROG_ERROR);
     116        &my_die("Unable to parse metadata config doc", $dist_id, $component, $outdir, $PS_EXIT_PROG_ERROR);
    117117
    118118    my $results = parse_md_list($metadata);
     
    120120    if ((scalar @$results) != 1) {
    121121        my $n = scalar @$results;
    122         &my_die("Unexected number of results from dist_make_bundle.pl: $n", $dist_id, $component, $PS_EXIT_PROG_ERROR);
     122        &my_die("Unexected number of results from dist_make_bundle.pl: $n", $dist_id, $component, $outdir, $PS_EXIT_PROG_ERROR);
    123123    }
    124124    my $result = $results->[0];
    125125
    126126    $file_name = $result->{name};
    127     &my_die("undefined file name from dist_bundle.pl", $dist_id, $component, $PS_EXIT_PROG_ERROR) unless defined $file_name;
     127    &my_die("undefined file name from dist_bundle.pl", $dist_id, $component, $outdir, $PS_EXIT_PROG_ERROR) unless defined $file_name;
    128128
    129129    $bytes = $result->{bytes};
    130     &my_die("undefined file size from dist_bundle.pl", $dist_id, $component, $PS_EXIT_PROG_ERROR) unless defined $bytes;
     130    &my_die("undefined file size from dist_bundle.pl", $dist_id, $component, $outdir, $PS_EXIT_PROG_ERROR) unless defined $bytes;
    131131
    132132    $md5sum = $result->{md5sum};
    133     &my_die("undefined file md5sum from dist_bundle.pl", $dist_id, $component, $PS_EXIT_PROG_ERROR) unless defined $md5sum;
     133    &my_die("undefined file md5sum from dist_bundle.pl", $dist_id, $component, $outdir, $PS_EXIT_PROG_ERROR) unless defined $md5sum;
    134134}
    135135
     
    144144        unless ($success) {
    145145            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    146             &my_die("Unable to perform $command: $error_code", $dist_id, $component, $error_code);
     146            &my_die("Unable to perform $command: $error_code", $dist_id, $component, $outdir, $error_code);
    147147        }
    148148    } else {
     
    159159    my $dist_id = shift;        # distRun.dist_id
    160160    my $component = shift;      # class_id, skycell_id, or exposure
     161    my $outdir = shift;         # output directory
    161162    my $exit_code = shift;      # Exit code to add
    162163
     
    166167    $command   .= " -dist_id $dist_id";
    167168    $command   .= " -component $component";
     169    $command   .= " -outdir $outdir";
    168170    $command   .= " -fault $exit_code";
    169171    $command   .= " -dbname $dbname" if defined $dbname;
Note: See TracChangeset for help on using the changeset viewer.