IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41597


Ignore:
Timestamp:
May 18, 2021, 2:20:37 PM (5 years ago)
Author:
eugene
Message:

merge changes from trunk: neb-host in ~ippps1; add protective quotes in nightly_science.pro; add updatenewexp and updatesummitexp modes to pztool; tools/croot points at newer ps2 datastore

Location:
tags/ipp-ps1-20210510
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-ps1-20210510

  • tags/ipp-ps1-20210510/Nebulous-Server/bin/neb-host

    r35887 r41597  
    2525# $dbpass = $ENV{'NEB_PASS'} unless $dbpass;
    2626
    27 my $conffile = "/home/panstarrs/ipp/ippconfig/nebulous.config";
     27# my $conffile = "/data/ippc64.1/ippitc/ippconfig/nebulous.config";
     28# my $conffile = "/home/panstarrs/ipp/ippconfig/nebulous.config";
     29my $conffile = "/home/panstarrs/ippps1/ippconfig/nebulous.config";
     30
    2831if (-e $conffile) {
    2932#    printf STDERR "found config\n";
  • tags/ipp-ps1-20210510/ippTasks/nightly_science.pro

    r39361 r41597  
    111111
    112112   if ($?camera_map:$2)
    113       if ($camera_map:$2 != "$3")
     113      if ("$camera_map:$2" != "$3")
    114114         echo "camera $3 does not match expected camera $camera_map:$2"
    115115         break
  • tags/ipp-ps1-20210510/ippTasks/summit.copy.pro

    r39520 r41597  
    2424
    2525# list of DataStores to pull data from
    26 book init pzDataStore
     26# book init pzDataStore
    2727# list of summit exps that need to be queried
    2828book init pzPendingExp
     
    155155    task.exit 0
    156156        # flush pzDataStore book
    157 #        book init pzDataStore
     157        book init pzDataStore
    158158        # convert 'stdout' to book format
    159159        ipptool2book stdout pzDataStore -key camera:telescope -uniq -setword dbname $options:0
  • tags/ipp-ps1-20210510/ippTools

  • tags/ipp-ps1-20210510/ippTools/src

  • tags/ipp-ps1-20210510/ippTools/src/pztool.c

    r39519 r41597  
    4949static bool updatepzexpMode(pxConfig *config);
    5050static bool updatenewexpMode(pxConfig *config);
     51static bool updatesummitExpMode(pxConfig *config);
    5152
    5253// static bool copydoneCompleteExp(pxConfig *config);
     
    5455static psArray *pzArrayZip(psArray *arraySet, psS64 limit);
    5556static bool pzDownloadExpSetState(pxConfig *config, const psS64 summit_id, const char *state);
     57static bool summitExpSetFault(pxConfig *config, const psS64 summit_id, const int fault);
    5658
    5759# define MODECASE(caseName, func) \
     
    8890        MODECASE(PZTOOL_MODE_UPDATEPZEXP, updatepzexpMode);
    8991        MODECASE(PZTOOL_MODE_UPDATENEWEXP, updatenewexpMode);
     92        MODECASE(PZTOOL_MODE_UPDATESUMMITEXP, updatesummitExpMode);
    9093        default:
    9194            psAbort("invalid option (this should not happen)");
     
    933936}
    934937
     938static bool summitExpSetFault(pxConfig *config, const psS64 summit_id, const int fault)
     939{
     940    // check that state is a valid string value
     941  if ((fault < 0) || (fault > 2048)) {
     942    psError(PS_ERR_UNKNOWN, false,
     943            "invalid summitExp fault: %d", fault);
     944    return false;
     945  }
     946
     947    char *query = "UPDATE summitExp SET fault = %d WHERE summit_id = %ld";
     948    if (!p_psDBRunQueryF(config->dbh, query, fault, summit_id)) {
     949        psError(PS_ERR_UNKNOWN, false, "failed to change state for %lld", (long long) summit_id);
     950        return false;
     951    }
     952
     953    return true;
     954}
     955
     956static bool updatesummitExpMode(pxConfig *config)
     957{
     958  int fault;
     959
     960  PS_ASSERT_PTR_NON_NULL(config, false);
     961  PXOPT_LOOKUP_S64(summit_id, config->args, "-summit_id", true, false);
     962  PXOPT_LOOKUP_S32(state,    config->args, "-set_fault",true, false);
     963
     964  if (!summitExpSetFault(config,summit_id, fault)) {
     965    psError(PS_ERR_UNKNOWN, false, "failed to change state for %lld", (long long) summit_id);
     966    return false;
     967  }
     968  return true;
     969}
     970 
     971 
    935972static bool updatepzexpMode(pxConfig *config)
    936973{
  • tags/ipp-ps1-20210510/ippTools/src/pztool.h

    r30353 r41597  
    3939    PZTOOL_MODE_UPDATEPZEXP,
    4040    PZTOOL_MODE_UPDATENEWEXP,
     41    PZTOOL_MODE_UPDATESUMMITEXP,
    4142} pztoolMode;
    4243
  • tags/ipp-ps1-20210510/ippTools/src/pztoolConfig.c

    r39519 r41597  
    171171    psMetadataAddStr(updatepzexpArgs, PS_LIST_TAIL, "-set_state",  0,            "define new state (required)", NULL);
    172172   
     173    // -updatesummitexp
     174    psMetadata *updatesummitexpArgs = psMetadataAlloc();
     175    psMetadataAddS64(updatesummitexpArgs, PS_LIST_TAIL, "-summit_id", 0,     "define summit_id", 0);
     176    psMetadataAddStr(updatesummitexpArgs, PS_LIST_TAIL, "-exp_name",   0,            "search by exposure name (required)", NULL);
     177    psMetadataAddStr(updatesummitexpArgs, PS_LIST_TAIL, "-inst",       0,            "search by camera (required)", NULL);
     178    psMetadataAddStr(updatesummitexpArgs, PS_LIST_TAIL, "-telescope",  0,            "search by telescope (required)", NULL);
     179    psMetadataAddS32(updatesummitexpArgs, PS_LIST_TAIL, "-set_fault",  0,            "define new fault (required)", 0);
     180   
    173181    // -updatenewexp
    174182    psMetadata *updatenewexpArgs = psMetadataAlloc();
  • tags/ipp-ps1-20210510/ppTranslate/src/ppMops.h

    r40582 r41597  
    1212//#define SOURCE_MASK2 (PM_SOURCE_MODE2_DIFF_WITH_DOUBLE | PM_SOURCE_MODE2_ON_SPIKE | PM_SOURCE_MODE2_ON_STARCORE | PM_SOURCE_MODE2_ON_BURNTOOL | PM_SOURCE_MODE2_ON_CONVPOOR) // Flags2 to exclude
    1313#define SOURCE_MASK2 (PM_SOURCE_MODE2_DEFAULT) //Flags2 to exclude
     14//#define SOURCE_MASK2 (PM_SOURCE_MODE2_SATSTAR_PROFILE) //Flags2 to exclude
    1415
    1516#define PS1_DV_FORMAT "PS1_DV%d"
  • tags/ipp-ps1-20210510/psastro

  • tags/ipp-ps1-20210510/psastro/src/psastroLoadCrosstalk.c

    r41591 r41597  
    409409              if (!(X == crossChip)) {
    410410                psTrace ("psastro.crosstalk",2,"Chip (%d%d) not a known crosstalk source.",X,Y);
    411                 psLogMsg ("psastro", PS_LOG_INFO, "Chip (%d%d) not a known crosstalk source.",X,Y);
    412411                continue;
    413412              }
  • tags/ipp-ps1-20210510/psconfig

  • tags/ipp-ps1-20210510/psconfig/pscheckmods

    r40672 r41597  
    77    shift @ARGV;
    88}
    9 if (@ARGV > 2 && $ARGV[0] eq "-debug") {
    10     $DEBUG = 1;
    11     shift @ARGV;
    12 }
    13 if (@ARGV != 2) { die "USAGE: pscheckmods [-v] [-debug] (module) (version)\n"; }
     9if (@ARGV != 2) { die "USAGE: pscheckmods (module) (version)\n"; }
    1410
    1511if ($VERBOSE) { print STDERR "checking in @INC\n"; }
     
    2824print "$ARGV[0]: $version\n";
    2925
    30 if ($ARGV[1] > $version) {
     26my $requireExact = 0;
     27my $myVersion = $ARGV[1];
     28if ($myVersion =~ m|^=.|) {
     29    $requireExact = 1;
     30    $myVersion =~ s|^=||;
     31    print "$ARGV[1], $myVersion\n";
     32}
     33
     34if ($myVersion > $version) {
    3135    print "$ARGV[0] is too old: have $version : need $ARGV[1]\n";
    3236    exit 1;
    3337}
     38
     39if ($requireExact && ($myVersion != $version)) {
     40    print "$ARGV[0] is not the right version: have $version : need $myVersion\n";
     41    exit 1;
     42}
     43
    3444
    3545exit 0;
     
    4959          print "real: $realfilename\n" if $DEBUG;
    5060          if (-f $realfilename) {
    51               print "my filename: $filename\n" if $DEBUG;
    5261              $INC{$filename} = $realfilename;
    5362              print "calling 'do' on $realfilename\n" if $DEBUG;
  • tags/ipp-ps1-20210510/psconfig/tagsets/ipp-3.0.perl

    r39453 r41597  
    6868  55    IPC::Run                       IPC-Run-0.80.tar.gz                      0              NONE      NONE
    6969  56    Cache                          Cache-2.04.tar.gz                        0              NONE      NONE
    70   57    IPC::Cmd                       IPC-Cmd-0.36.tar.gz                      0.36           NONE      NONE
     70  57    IPC::Cmd                       IPC-Cmd-0.36.tar.gz                      =0.36           NONE      NONE
    7171  58    SOAP::Lite                     SOAP-Lite-0.69.v1.tar.gz                 0              NONE      yes,yes,no
    7272  59    Log::Log4perl                  Log-Log4perl-1.10.v1.tar.gz              0              NONE      NONE
  • tags/ipp-ps1-20210510/pstamp/scripts/dquery_job_run.pl

    r41479 r41597  
    121121my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    122122    run(command => $command, verbose => $verbose);
     123## MEH need to adjust error_code to rc
    123124unless ($success) {
    124125    my $rc = $error_code >> 8;
     
    388389    $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code;
    389390
    390     carp("$message : $QUERY_ID $FPA_ID $MJD_OBS $FILTER $OBSCODE $STAGE");
     391    #carp("$message : $QUERY_ID $FPA_ID $MJD_OBS $FILTER $OBSCODE $STAGE");
     392    carp("$message : $QUERY_ID $FPA_ID $MJD_OBS $FILTER $OBSCODE $STAGE $exit_code");
     393
    391394    exit($exit_code);
    392395
  • tags/ipp-ps1-20210510/pstamp/scripts/dqueryparse.pl

    r41478 r41597  
    385385                    ($query{$fpa_id}{STATE}[$valid_index] eq 'drop') or
    386386                    ($query{$fpa_id}{STATE}[$valid_index] eq 'error_cleaned') or
    387                     ($query{$fpa_id}{DATA_STATE}[$valid_index] eq 'error_cleaned') or
     387                    ($query{$fpa_id}{DATA_STATE}[$valid_index] eq 'error_cleaned') or
    388388                    ($query{$fpa_id}{STATE}[$valid_index] eq 'goto_scrubbed') or
    389389                    ($query{$fpa_id}{DATA_STATE}[$valid_index] eq 'scrubbed')) {
     
    391391                    # image is gone and it's not coming back
    392392                    $query{$fpa_id}{FAULT}[$valid_index] = $PSTAMP_GONE;
    393                     ## MEH error_cleaned isn't necessarily gone though
    394                     ## if BAD_COMPONENT not set then doesn't get added to faulted_rows list (others need this too?)
    395                     $query{$fpa_id}{BAD_COMPONENT}[$valid_index] = 1;
     393                    ## MEH why was this missing? should be added to other FAULT cases...
     394                    ## messes with row order, skipping the faulted rows on output, unclear if problem since happens in other cases too
     395                    $query{$fpa_id}{BAD_COMPONENT}[$valid_index] = 1;
    396396                }
    397397                elsif ($need_magic and ($query{$fpa_id}{MAGICKED}[$valid_index] eq 0)) {
  • tags/ipp-ps1-20210510/pstamp/scripts/pstamp_job_run.pl

    r41480 r41597  
    611611                    print STDERR "file $f is not available\n";
    612612                    $return_code = 0;
    613                     ## MEH doesn't look like return_code is even used from check_files...
    614                     ## if file is not available, why is my_die not called with PSTAMP_NOT_AVAILABLE?
    615                     ## is this only the case when neb-host down and fails to wait for fix?
    616                     ## with multiple data nodes down, this needs to be a fault case
    617                     my_die( "file $f is not available:", $job_id, $error_code, 'stop');
     613                    ## MEH 20210127 doesn't look like return_code is even used from check_files...
     614                    ## if file is not available, why is my_die not called with PSTAMP_NOT_AVAILABLE?
     615                    ## is this only the case when neb-host down and fails to wait for fix?
     616                    ## with multiple data nodes down, this needs to be a fault case
     617                    my_die( "file $f is not available:", $job_id, $error_code, 'stop');
    618618                }
    619619            } else {
  • tags/ipp-ps1-20210510/pstamp/scripts/pstamp_server_status

    r41497 r41597  
    124124        if ($controller_state) {
    125125            print $br . "Pantasks Controller $controller_state.\n";
    126             # loading active labels
    127             my $runlabels = `echo \"show.labels; quit\" \| pantasks_client -c ~ippitc/pstamp/ptolemy.rc \| tail -n +7`;
    128             print $br."current labels: \n".$runlabels."\n";
    129126        } else {
    130127            print STDERR "Controller state not found";
  • tags/ipp-ps1-20210510/tools

  • tags/ipp-ps1-20210510/tools/croot

    r38490 r41597  
    2828} elsif ($camera eq 'gpc2')  {
    2929    $out = `dsrootls --uri http://dsmaster.ps2/ds/index.txt`;
     30## old tunnel 201809xx MEH   
     31#    $out = `dsrootls --uri http://conductor.ps2.ifa.hawaii.edu:8080/ds/index.txt`;
    3032} else {
    3133    die "don't know data store address for camera $camera\n";
Note: See TracChangeset for help on using the changeset viewer.