IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30489 for trunk/ippTasks


Ignore:
Timestamp:
Feb 3, 2011, 2:51:02 PM (15 years ago)
Author:
bills
Message:

Changes to support storing distribution bundles in nebulous

Location:
trunk/ippTasks
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/dist.pro

    r30436 r30489  
    9595end
    9696
     97# This is now only used if we are not using a nebulous outroot
    9798macro get.host.for.component
    9899    if ($0 != 3)
     
    122123end
    123124
     125# This is now only used if we are not using a nebulous outroot
    124126macro set.dist.workdir.by.component
    125127    if ($0 != 5)
     
    139141    book getword ipphosts distribution count -var count
    140142    if ("$count" == "NULL")
    141         echo "ERROR: distributin hosts list is empty"
     143        echo "ERROR: distribution hosts list is empty"
    142144        break
    143145    end
     
    289291    end
    290292
    291 
    292     set.dist.workdir.by.component $DIST_STAGE_ID $COMPONENT $OUTDIR_TEMPLATE OUTDIR
    293     if ("$OUTDIR" == "NULL")
    294         echo ERROR failed to set workdir for $COMPONENT
    295         break
    296     end
    297 
    298293    substr $COMPONENT 0 3 COMP_HEAD
    299294    if ("$COMP_HEAD" == "sky")
    300295        set.host.for.skycell $COMPONENT
     296        set.workdir.by.skycell $COMPONENT $OUTDIR_TEMPLATE $default_host OUTDIR
    301297    else
    302         # assume component is a class_id, if not we will default to anyhost
     298        # assume component is a class_id, if  it is not we will default to
     299        # host "anyhost"
     300        # and volume "any"
    303301        set.host.for.camera $CAMERA $COMPONENT
     302        set.workdir.by.camera $CAMERA $COMPONENT $OUTDIR_TEMPLATE $default_host OUTDIR
     303    end
     304
     305    if ("$OUTDIR" == "NULL")
     306        echo ERROR failed to set workdir for $COMPONENT
     307        break
    304308    end
    305309
    306310    sprintf logfile "%s/dist.%s.%s.log" $OUTDIR $DIST_ID $COMPONENT
    307 #    stdout $logfile
    308 #    stderr $logfile
    309311
    310312    $run = dist_component.pl --dist_id $DIST_ID --camera $CAMERA --stage $DIST_STAGE --stage_id $DIST_STAGE_ID --component $COMPONENT --path_base $PATH_BASE --chip_path_base $CHIP_PATH_BASE --state $STATE --data_state $DATA_STATE $EXTRA_ARGS --outdir $OUTDIR --logfile $logfile
     
    401403    book getpage distToAdvance 0 -var pageName -key pantaskState INIT
    402404    if ("$pageName" == "NULL") break
     405
     406    # XXX the sql for disttool -toadvance does not include the camera:
     407    # hack around this for now
     408    $CAMERA = GPC1
    403409
    404410    book setword distToAdvance $pageName pantaskState RUN
     
    414420    end
    415421
    416     host anyhost
    417 
    418     # using $DIST_ID as the "component" works fine here since we only look
    419     # at the last two digits. But make sure that there 2 digits
    420     $fake_component = $STAGE_ID + 10
    421     set.dist.workdir.by.component $fake_component "exposure" $OUTDIR_TEMPLATE OUTDIR
     422    substr $OUTDIR_TEMPLATE 0 3 SCHEME
     423    if ("$SCHEME" == "neb")
     424        # XXX This does not work if workdir is not in nebulous
     425        # and $default_host == "any" because /data/any does not exist
     426        # use "dummy" as component. Result will be 'any'
     427        # set.workdir.by.camera $CAMERA dummy $OUTDIR_TEMPLATE $default_host OUTDIR
     428        set.workdir.by.camera GPC1 dummy $OUTDIR_TEMPLATE $default_host OUTDIR
     429    else
     430        # using $DIST_ID as the "component" works fine here since we only look
     431        # at the last two digits. But make sure that there 2 digits
     432        $fake_component = $STAGE_ID + 10
     433        set.dist.workdir.by.component $fake_component "exposure" $OUTDIR_TEMPLATE OUTDIR
     434    end
     435 
    422436    if ("$OUTDIR" == "NULL")
    423437        echo ERROR failed to set workdir for $DIST_ID
    424438        break
    425439    end
     440    host anyhost
    426441
    427442    sprintf logfile "%s/dist.advance.%s.log" $OUTDIR $DIST_ID
    428 #    stdout $logfile
    429 #    stderr $logfile
    430 
    431     $run = dist_advancerun.pl --dist_id $DIST_ID --stage $STAGE --stage_id $STAGE_ID --outdir $OUTDIR $EXTRA_ARGS --logfile $logfile
     443
     444    $run = dist_advancerun.pl --dist_id $DIST_ID --stage $STAGE --stage_id $STAGE_ID --camera $CAMERA --outdir $OUTDIR $EXTRA_ARGS --logfile $logfile
    432445    add_standard_args run
    433446
  • trunk/ippTasks/rcserver.pro

    r28792 r30489  
    136136
    137137    sprintf logfile "%s/makefs.%s.%s.log" $DIST_DIR $DIST_ID $DEST_ID
    138     stdout $logfile
    139     stderr $logfile
    140138
    141139    book setword rcPendingFS $pageName pantaskState RUN
    142140
    143     $run = dist_make_fileset.pl --dist_id $DIST_ID --target_id $TARGET_ID --stage $STAGE --stage_id $STAGE_ID --data_group $DATA_GROUP --filter $FILTER --dest_id $DEST_ID --product_name $PRODUCT_NAME  --ds_dbhost $DS_DBHOST --ds_dbname $DS_DBNAME --dist_dir $DIST_DIR
     141    $run = dist_make_fileset.pl --dist_id $DIST_ID --target_id $TARGET_ID --stage $STAGE --stage_id $STAGE_ID --data_group $DATA_GROUP --filter $FILTER --dest_id $DEST_ID --product_name $PRODUCT_NAME  --ds_dbhost $DS_DBHOST --ds_dbname $DS_DBNAME --dist_dir $DIST_DIR --logfile $logfile
    144142
    145143    add_standard_args run
  • trunk/ippTasks/survey.pro

    r30376 r30489  
    287287# user functions to manipulate dist labels
    288288macro survey.add.dist
    289   if ($0 != 2)
    290     echo "USAGE: survey.add.dist (label)"
     289  if ($0 != 3)
     290    echo "USAGE: survey.add.dist (label) (workdir)"
    291291    break
    292292  end
    293293  book newpage SURVEY_DIST $1
     294  book setword SURVEY_DIST $1 WORKDIR $2
    294295  book setword SURVEY_DIST $1 STATE PENDING
    295296end
     
    896897    end
    897898
     899    book getword SURVEY_DIST $label WORKDIR -var workdir_base
     900    $year = `date +%Y`
     901    $month = `date +%m`
     902    $day = `date +%d`
     903    $workdir = $workdir_base/$label/$year/$month/$day
     904
    898905    book setword SURVEY_DIST $label STATE DONE
    899906 
    900907    # note workdir is set by the script based on site.config
    901     $run = dist_defineruns.pl --label $label
     908    $run = dist_defineruns.pl --label $label --workdir $workdir
    902909
    903910    if ($DB:n == 0)
     
    908915    end
    909916   
    910 #    echo $run
     917    if ($VERBOSE > 1 )
     918        echo $run
     919    end
    911920    command $run
    912921  end
Note: See TracChangeset for help on using the changeset viewer.