IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42387 for trunk/ippTools/src


Ignore:
Timestamp:
Feb 8, 2023, 12:14:39 PM (3 years ago)
Author:
eugene
Message:

merge from eam_branches/ipp-20220316. add safety to pxadmin to prevent drop of ops dbs, add fpcamera, more flexibility in ippadmin for testing; prevent pzgetexp from trying to download too many exposures

Location:
trunk/ippTools
Files:
6 edited
5 copied

Legend:

Unmodified
Added
Removed
  • trunk/ippTools

  • trunk/ippTools/src

  • trunk/ippTools/src/Makefile.am

    r36511 r42387  
    3535        releasetool \
    3636        fftool \
     37        fpcamtool \
    3738        remotetool
    3839
     
    5556        pxtoolsErrorCodes.h \
    5657        pxtree.h \
     58        pxfpcam.h \
    5759        pxwarp.h
    5860
     
    9193        releasetool.h \
    9294        fftool.h \
     95        fpcamtool.h \
    9396        remotetool.h
    9497
     
    116119        pxtoolsErrorCodes.c \
    117120        pxtree.c \
     121        pxfpcam.c \
    118122        pxwarp.c
    119123
     
    174178    camtool.c \
    175179    camtoolConfig.c
     180
     181fpcamtool_CFLAGS = $(PSLIB_CFLAGS) $(PSMODULES_CFLAGS) $(IPPDB_CFLAGS)
     182fpcamtool_LDADD = $(PSLIB_LIBS) $(PSMODULES_LIBS) $(IPPDB_LIBS) libpxtools.la
     183fpcamtool_SOURCES = \
     184    fpcamtool.c \
     185    fpcamtoolConfig.c
    176186
    177187faketool_CFLAGS = $(PSLIB_CFLAGS) $(PSMODULES_CFLAGS) $(IPPDB_CFLAGS)
  • trunk/ippTools/src/pxadmin.c

    r26981 r42387  
    184184        psString dbName = name->data.str;
    185185
     186        // if name is e.g., gpc1, strcasecmp returns FALSE
     187        bool allowDelete = true;
     188        allowDelete = allowDelete && strcasecmp(dbName, "gpc1"); 
     189        allowDelete = allowDelete && strcasecmp(dbName, "gpc2"); 
     190        allowDelete = allowDelete && strcasecmp(dbName, "nebulous"); 
     191        allowDelete = allowDelete && strcasecmp(dbName, "isp"); 
     192        allowDelete = allowDelete && strcasecmp(dbName, "ssp"); 
     193        allowDelete = allowDelete && strcasecmp(dbName, "uic"); 
     194        allowDelete = allowDelete && strcasecmp(dbName, "hsc_v1"); 
     195        allowDelete = allowDelete && strcasecmp(dbName, "megacam_v1"); 
     196
     197        if (!allowDelete) {
     198            fprintf (stdout, "**** WARNING: not allowed to delete database %s.\n", dbName);
     199            return false;
     200        }
     201
    186202        fprintf(stdout, "*** delete the tables from database %s? ***\n", dbName);
    187203        fprintf(stdout, "*** to delete the tables, answer YES, and give password ***\n");
  • trunk/ippTools/src/pxcam.c

    r41213 r42387  
    174174                         "new", // state
    175175                         workdir  ? workdir  : "NULL",
    176                          "dirty", //workdir_state
     176                         "dirty", // workdir_state
    177177                         label    ? label    : "NULL",
    178178                         data_group ? data_group : "NULL",
  • trunk/ippTools/src/pzgetexp.c

    r31038 r42387  
    136136    psFree(cmdOutput);
    137137    if (!newSummitExps) {
    138         // XXX not nessicarily an error
     138        // XXX not necessarily an error?
    139139        psError(PS_ERR_UNKNOWN, true, "no new fileSet/exp IDs");
    140140        return false;
     
    145145        return true;
    146146    }
     147    // If we supply an unknown last_fileset (exposure name) to the summit datastore,
     148    // it will return all filesets it knows about.  This can cause problems (table overflow)
     149    // if this is too large a number.  Raise an error and let the user fix the underlying
     150    // problem (last exposure not known to the summit datastore)
     151    // Do we need to be able to configure this number?
     152    if (psArrayLength(newSummitExps) > 10000) {
     153        psError(PS_ERR_UNKNOWN, true, "too many new fileSet/exp IDs? unknown exposure? problem with summitExp table?");
     154        return false;
     155    }
    147156
    148157    // start a transaction so it's all rows or nothing
     
    153162    }
    154163
    155     // increase memory table size limits; deafult is 16MB
    156     {
     164    // increase memory table size limits; default is 16MB, but our current (2022) config
     165    // in /etc/mysql/my.cnf sets to default to 1024M.
     166    // This command sets the max_heap_table_size within the transaction, and does not
     167    // apparently stick.  But this is not really needed, so we are deactivating it.
     168    if (0) {
    157169        // 512MB
    158170        char *query = "SET max_heap_table_size = 1024*1024*512";
Note: See TracChangeset for help on using the changeset viewer.