Changeset 30579 for branches/eam_branches/ipp-20101205/ippTasks
- Timestamp:
- Feb 11, 2011, 2:49:34 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20101205/ippTasks
- Files:
-
- 6 edited
-
diskbalance.pro (modified) (1 diff)
-
dist.pro (modified) (6 diffs)
-
pstamp.pro (modified) (9 diffs)
-
rcserver.pro (modified) (3 diffs)
-
register.pro (modified) (5 diffs)
-
survey.pro (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/ippTasks/diskbalance.pro
r29631 r30579 194 194 book getword balancePending $pageName source_name -var SOURCE 195 195 book getword balancePending $pageName destination_name -var DESTINATION 196 196 book getword balancePending $pageName destination_host -var DEST_HOST 197 197 # Fix this with multihost restriction when possible. 198 set.host.for.balance $DEST INATION198 set.host.for.balance $DEST_HOST 199 199 200 200 stdout NULL -
branches/eam_branches/ipp-20101205/ippTasks/dist.pro
r30446 r30579 95 95 end 96 96 97 # This is now only used if we are not using a nebulous outroot 97 98 macro get.host.for.component 98 99 if ($0 != 3) … … 122 123 end 123 124 125 # This is now only used if we are not using a nebulous outroot 124 126 macro set.dist.workdir.by.component 125 127 if ($0 != 5) … … 139 141 book getword ipphosts distribution count -var count 140 142 if ("$count" == "NULL") 141 echo "ERROR: distributi n hosts list is empty"143 echo "ERROR: distribution hosts list is empty" 142 144 break 143 145 end … … 289 291 end 290 292 291 292 set.dist.workdir.by.component $DIST_STAGE_ID $COMPONENT $OUTDIR_TEMPLATE OUTDIR293 if ("$OUTDIR" == "NULL")294 echo ERROR failed to set workdir for $COMPONENT295 break296 end297 298 293 substr $COMPONENT 0 3 COMP_HEAD 299 294 if ("$COMP_HEAD" == "sky") 300 295 set.host.for.skycell $COMPONENT 296 set.workdir.by.skycell $COMPONENT $OUTDIR_TEMPLATE $default_host OUTDIR 301 297 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" 303 301 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 304 308 end 305 309 306 310 sprintf logfile "%s/dist.%s.%s.log" $OUTDIR $DIST_ID $COMPONENT 307 # stdout $logfile308 # stderr $logfile309 311 310 312 $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 … … 401 403 book getpage distToAdvance 0 -var pageName -key pantaskState INIT 402 404 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 403 409 404 410 book setword distToAdvance $pageName pantaskState RUN … … 414 420 end 415 421 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 422 436 if ("$OUTDIR" == "NULL") 423 437 echo ERROR failed to set workdir for $DIST_ID 424 438 break 425 439 end 440 host anyhost 426 441 427 442 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 432 445 add_standard_args run 433 446 -
branches/eam_branches/ipp-20101205/ippTasks/pstamp.pro
r30446 r30579 18 18 $pstampStopFaulted_DB = 0 19 19 20 # give up on dependents with fault_count >= $PSTAMP_MAX_FAULT_COUNT 21 $PSTAMP_MAX_FAULT_COUNT = 5 22 macro set.max.fault.count 23 $PSTAMP_MAX_FAULT_COUNT = $1 24 end 25 macro get.max.fault.count 26 echo maximum fault count: $PSTAMP_MAX_FAULT_COUNT 27 end 28 $POLL_DEP = 500 29 30 macro set.dependent.poll 31 $POLL_DEP = $1 32 end 33 macro get.dependent.poll 34 echo dependent poll limit: $POLL_DEP 35 end 36 20 37 # set PS_DBSERVER if postage stamp database host is not the same as the value for DBSERVER in site.config 21 38 # warning: no quotes around the two words. That causes the variable to get passed to pstamptool as one word … … 137 154 end 138 155 end 156 139 157 macro pstamp.find.on 140 158 task pstamp.request.find … … 143 161 end 144 162 macro pstamp.find.off 145 task pstamp.request.find.load 146 active false 163 task pstamp.request.find 164 active false 165 end 166 end 167 168 macro pstamp.dependent.on 169 task pstamp.dependent.load 170 active true 171 end 172 task pstamp.dependent.run 173 active true 174 end 175 end 176 macro pstamp.dependent.off 177 task pstamp.dependent.load 178 active false 179 end 180 task pstamp.dependent.run 181 active false 182 end 183 end 184 185 186 macro pstamp.status.on 187 task pstamp.save.status 188 active true 189 end 190 end 191 macro pstamp.status.off 192 task pstamp.save.status 193 active false 194 end 195 end 196 197 macro pstamp.status.set.exec 198 task pstamp.save.status 199 periods -exec $1 147 200 end 148 201 end … … 509 562 echo pstamp.job.run task.exit $JOB_ID status: $JOB_STATUS 510 563 end 511 showcommand failure564 # showcommand failure 512 565 process_exit pstampJob $options:0 $JOB_STATUS 513 566 end … … 593 646 add_poll_args run 594 647 add_poll_labels run 595 command $run 648 command $run -limit $POLL_DEP 596 649 end 597 650 … … 648 701 book getword pstampDependent $pageName outdir -var OUTDIR 649 702 book getword pstampDependent $pageName need_magic -var NEED_MAGIC 703 book getword pstampDependent $pageName fault_count -var FAULT_COUNT 650 704 book getword pstampDependent $pageName dbname -var DBNAME 651 705 … … 666 720 stderr $MYLOGFILE 667 721 668 $run = pstamp_checkdependent.pl --dep_id $DEP_ID --stage_id $STAGE_ID --stage $STAGE --component $COMPONENT --imagedb $IMAGEDB --rlabel $RLABEL $NEED_MAGIC 722 $run = pstamp_checkdependent.pl --dep_id $DEP_ID --stage_id $STAGE_ID --stage $STAGE --component $COMPONENT --imagedb $IMAGEDB --rlabel $RLABEL $NEED_MAGIC --fault_count $FAULT_COUNT --max_fault_count $PSTAMP_MAX_FAULT_COUNT 669 723 670 724 add_standard_args run … … 689 743 echo pstamp.job.run task.exit $DEP_ID status: $JOB_STATUS 690 744 end 691 showcommand failure745 # showcommand failure 692 746 process_exit pstampDependent $options:0 $JOB_STATUS 693 747 end … … 905 959 end 906 960 end 961 962 task pstamp.save.status 963 host local 964 965 periods -poll $LOADPOLL 966 periods -exec 90 967 periods -timeout 20 968 npending 1 969 970 task.exec 971 stdout NULL 972 stderr $LOGSUBDIR/pstamp.save.status.log 973 974 $run = pstamp_save_server_status.pl --update-link 975 command $run 976 end 977 978 task.exit $EXIT_SUCCESS 979 # echo nothing to do 980 end 981 982 task.exit default 983 showcommand failure 984 end 985 986 task.exit crash 987 showcommand crash 988 end 989 990 task.exit timeout 991 showcommand timeout 992 end 993 end -
branches/eam_branches/ipp-20101205/ippTasks/rcserver.pro
r28792 r30579 40 40 active false 41 41 end 42 task rcserver.revert43 active false44 end45 42 end 46 43 … … 48 45 task rcserver.revert 49 46 active true 47 end 48 end 49 50 macro rcserver.revert.off 51 task rcserver.revert 52 active false 50 53 end 51 54 end … … 136 139 137 140 sprintf logfile "%s/makefs.%s.%s.log" $DIST_DIR $DIST_ID $DEST_ID 138 stdout $logfile139 stderr $logfile140 141 141 142 book setword rcPendingFS $pageName pantaskState RUN 142 143 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 144 $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 144 145 145 146 add_standard_args run -
branches/eam_branches/ipp-20101205/ippTasks/register.pro
r30446 r30579 105 105 106 106 macro register.add.date 107 if ($0 != 2)108 echo "USAGE: register.add.date (YYYY-MM-DD) "107 if ($0 != 4) 108 echo "USAGE: register.add.date (YYYY-MM-DD) (DBNAME) (VALID_BURNTOOL)" 109 109 break 110 110 end … … 112 112 book newpage regDates $1 113 113 book setword regDates $1 nsState NEW 114 book setword regDates $1 dbname $DB:0 115 end 116 117 118 $valid_burntool_value = 14 114 book setword regDates $1 dbname $2 115 book setword regDates $1 valid_burntool $3 116 end 117 118 119 # $valid_burntool_value = 14 119 120 $sunrise = 17:30:00 120 121 $sunset = 03:30:00 … … 565 566 if ($Npages == 0) 566 567 $today = `date -u +%Y-%m-%d` 568 $dbname = $DB:0 569 $valid_burntool = 14 567 570 else 568 571 book getpage regDates $reg_datePAGE -var today 572 book getword regDates $today dbname -var dbname 573 book getword regDates $today valid_burntool -var valid_burntool 569 574 $reg_datePAGE ++ 570 575 if ($reg_datePAGE >= $Npages) set reg_datePAGE = 0 … … 577 582 $dateobs_begin = $today\T$sunset 578 583 $dateobs_end = $today\T$sunrise 579 $run = $run -dateobs_begin $dateobs_begin -dateobs_end $dateobs_end -valid_burntool $valid_burntool_value 580 if ($DB:n == 0) 581 option DEFAULT 582 else 583 # save the DB name for the exit tasks 584 option $DB:$regPendingBurntoolImfile_DB 585 $run = $run -dbname $DB:$regPendingBurntoolImfile_DB 586 $regPendingBurntoolImfile_DB ++ 587 if ($regPendingBurntoolImfile_DB >= $DB:n) set regPendingBurntoolImfile_DB = 0 588 end 584 $run = $run -dateobs_begin $dateobs_begin -dateobs_end $dateobs_end -valid_burntool $valid_burntool 585 $run = $run -dbname $dbname 586 option $dbname 587 # if ($DB:n == 0) 588 # option DEFAULT 589 # else 590 # # save the DB name for the exit tasks 591 # option $DB:$regPendingBurntoolImfile_DB 592 # $run = $run -dbname $DB:$regPendingBurntoolImfile_DB 593 # if ("$dbname" != "$DB:$regPendingBurntoolImfile_DB") 594 # break 595 # end 596 # $regPendingBurntoolImfile_DB ++ 597 # if ($regPendingBurntoolImfile_DB >= $DB:n) set regPendingBurntoolImfile_DB = 0 598 # end 589 599 590 600 # echo $run … … 697 707 book setword regDates $today nsState NEW 698 708 book setword regDates $today dbname $DB:0 709 book setword regDates $today valid_burntool 14 699 710 700 711 command true -
branches/eam_branches/ipp-20101205/ippTasks/survey.pro
r30446 r30579 287 287 # user functions to manipulate dist labels 288 288 macro 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)" 291 291 break 292 292 end 293 293 book newpage SURVEY_DIST $1 294 book setword SURVEY_DIST $1 WORKDIR $2 294 295 book setword SURVEY_DIST $1 STATE PENDING 295 296 end … … 896 897 end 897 898 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 898 905 book setword SURVEY_DIST $label STATE DONE 899 906 900 907 # 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 902 909 903 910 if ($DB:n == 0) … … 908 915 end 909 916 910 # echo $run 917 if ($VERBOSE > 1 ) 918 echo $run 919 end 911 920 command $run 912 921 end … … 1126 1135 end 1127 1136 1128 echo $run1137 # echo $run 1129 1138 1130 1139 command $run
Note:
See TracChangeset
for help on using the changeset viewer.
