Changeset 25567
- Timestamp:
- Sep 24, 2009, 4:27:56 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
ippScripts/scripts/dist_make_fileset.pl (modified) (12 diffs)
-
ippScripts/scripts/rcserver_checkstatus.pl (modified) (1 diff)
-
ippTasks/rcserver.pro (modified) (9 diffs)
-
ippTools/share/disttool_pendingfileset.sql (modified) (1 diff)
-
ippTools/src/disttool.c (modified) (6 diffs)
-
ippTools/src/disttoolConfig.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/dist_make_fileset.pl
r25432 r25567 39 39 40 40 # Parse the command-line arguments 41 my ($dist_id, $dist_dir, $target_id, $stage, $stage_id, $ prod_id, $product_name, $ds_dbhost, $ds_dbname);41 my ($dist_id, $dist_dir, $target_id, $stage, $stage_id, $dest_id, $product_name, $ds_dbhost, $ds_dbname); 42 42 my ($dbname, $save_temps, $verbose, $no_update, $logfile); 43 43 … … 48 48 'stage=s' => \$stage, # raw, chip, camera, fake, warp, stack, or diff 49 49 'stage_id=s' => \$stage_id, # exp_id, chip_id, etc. 50 ' prod_id=s' => \$prod_id, # id for the product50 'dest_id=s' => \$dest_id, # id for the product 51 51 'product_name=s' => \$product_name, # location of the data store directory for this product 52 52 'ds_dbhost=s' => \$ds_dbhost, # database host for the datastore database … … 60 60 61 61 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 62 pod2usage( -msg => "Required options: --dist_id --dist_dir --target_id --stage --stage_id -- prod_id --ds_dbhost --ds_dbname",62 pod2usage( -msg => "Required options: --dist_id --dist_dir --target_id --stage --stage_id --dest_id --ds_dbhost --ds_dbname", 63 63 -exitval => 3) unless 64 64 defined $dist_id and … … 67 67 defined $stage and 68 68 defined $stage_id and 69 defined $ prod_id and69 defined $dest_id and 70 70 defined $product_name and 71 71 defined $ds_dbhost and … … 79 79 my $fs_tag = get_fileset_tag($ipprc, $stage, $stage_id, $dbname); 80 80 81 &my_die("failed to lookup fileset tag", $dist_id, $prod_id, $PS_EXIT_UNKNOWN_ERROR) if !defined $fs_tag; 82 83 my $fileset_name = "$fs_tag$stage.$stage_id.$dist_id.$prod_id"; 81 &my_die("failed to lookup fileset tag", $dist_id, $dest_id, $PS_EXIT_UNKNOWN_ERROR) if !defined $fs_tag; 82 83 my $fileset_name = $fs_tag ? "$fs_tag." : ""; 84 $fileset_name .= "$stage.$stage_id.$dist_id.$dest_id"; 84 85 85 86 print "$fileset_name\n"; … … 89 90 my $dbinfo_file = "dbinfo.$stage.$stage_id.mdc"; 90 91 if (! -e "$dist_dir/$dbinfo_file" ) { 91 &my_die("dbinfo file for dist run $dbinfo_file not found", $dist_id, $ prod_id, $PS_EXIT_UNKNOWN_ERROR);92 &my_die("dbinfo file for dist run $dbinfo_file not found", $dist_id, $dest_id, $PS_EXIT_UNKNOWN_ERROR); 92 93 } 93 94 print "dbinfo file $dbinfo_file exists\n" if $verbose; … … 96 97 my $dirinfo_file = "dirinfo.$stage.$stage_id.mdc"; 97 98 if (! -e "$dist_dir/$dirinfo_file" ) { 98 &my_die("dirinfo file for dist run $dirinfo_file not found", $dist_id, $ prod_id, $PS_EXIT_UNKNOWN_ERROR);99 &my_die("dirinfo file for dist run $dirinfo_file not found", $dist_id, $dest_id, $PS_EXIT_UNKNOWN_ERROR); 99 100 } 100 101 print "dirinfo file $dirinfo_file exists\n" if $verbose; … … 116 117 unless ($success) { 117 118 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 118 &my_die("Unable to perform $command error_code: $error_code", $dist_id, $ prod_id, $error_code);119 &my_die("Unable to perform $command error_code: $error_code", $dist_id, $dest_id, $error_code); 119 120 } 120 121 121 122 my $metadata = $mdcParser->parse (join "", @$stdout_buf) or 122 &my_die("Unable to parse metadata config doc", $dist_id, $ prod_id, $PS_EXIT_PROG_ERROR);123 &my_die("Unable to parse metadata config doc", $dist_id, $dest_id, $PS_EXIT_PROG_ERROR); 123 124 124 125 $components = parse_md_list($metadata); … … 153 154 154 155 # set the product specific columns in product list 155 $command .= " --ps0 $target_id --ps1 $stage --ps2 $stage_id --ps3 $fs_tag"; 156 my $prod_col_3 = $fs_tag ? $fs_tag : "$stage.$stage_id"; 157 158 $command .= " --ps0 $target_id --ps1 $stage --ps2 $stage_id --ps3 $prod_col_3"; 156 159 157 160 $command .= " --dbname $ds_dbname"; # XXX: notyet --dbhost $ds_dbhost … … 161 164 unless ($success) { 162 165 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 163 &my_die("Unable to perform $command error_code: $error_code", $dist_id, $prod_id, $error_code);166 &my_die("Unable to perform $command error_code: $error_code", $dist_id, $dest_id, $error_code); 164 167 } 165 168 } 166 169 167 170 { 168 my $command = "$disttool -addfileset -dist_id $dist_id - prod_id $prod_id -name $fileset_name";171 my $command = "$disttool -addfileset -dist_id $dist_id -dest_id $dest_id -name $fileset_name"; 169 172 $command .= " -dbname $dbname" if $dbname; 170 173 … … 175 178 # We need to have revertfileset check whether the fileset exists and do dsreg -del if it does 176 179 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 177 &my_die("Unable to perform $command error_code: $error_code", $dist_id, $ prod_id, $error_code);180 &my_die("Unable to perform $command error_code: $error_code", $dist_id, $dest_id, $error_code); 178 181 } 179 182 } … … 252 255 my $msg = shift; 253 256 my $dist_id = shift; 254 my $ prod_id = shift;257 my $dest_id = shift; 255 258 my $fault = shift; 256 259 257 # TODO: disttool -adddsfileset - prod_id $prod_id -dist_id $dist_id -fault $fault260 # TODO: disttool -adddsfileset -dest_id $dest_id -dist_id $dist_id -fault $fault 258 261 print STDERR "$msg\n"; 259 262 260 my $command = "$disttool -addfileset -dist_id $dist_id - prod_id $prod_id -fault $fault";263 my $command = "$disttool -addfileset -dist_id $dist_id -dest_id $dest_id -fault $fault"; 261 264 $command .= " -dbname $dbname" if $dbname; 262 265 -
trunk/ippScripts/scripts/rcserver_checkstatus.pl
r24030 r25567 40 40 41 41 # Parse the command-line arguments 42 my ($dest_id, $ prod_id, $status_uri, $last_fileset, $limit);42 my ($dest_id, $status_uri, $last_fileset, $limit); 43 43 my ($dbname, $save_temps, $verbose, $no_update, $logfile); 44 44 45 45 GetOptions( 46 46 'dest_id=s' => \$dest_id, # destination identifier 47 'prod_id=s' => \$prod_id, # product identifier48 47 'status_uri=s' => \$status_uri, # uri for the desination's status data store product 49 48 'last_fileset=s' => \$last_fileset, # name of last fileset seen on this datastore -
trunk/ippTasks/rcserver.pro
r24847 r25567 4 4 check.globals 5 5 6 #$LOGSUBDIR = $LOGDIR/rcserver6 $LOGSUBDIR = $LOGDIR/rcserver 7 7 mkdir $LOGSUBDIR 8 8 … … 66 66 67 67 stdout NULL 68 stderr $LOG DIR/rcserver.makefileset.load.log68 stderr $LOGSUBDIR/rcserver.makefileset.load.log 69 69 70 70 task.exec … … 86 86 task.exit 0 87 87 # convert 'stdout' to book format 88 ipptool2book stdout rcPendingFS -key dist_id: prod_id -uniq -setword dbname $options:0 -setword pantaskState INIT88 ipptool2book stdout rcPendingFS -key dist_id:dest_id -uniq -setword dbname $options:0 -setword pantaskState INIT 89 89 if ($VERBOSE > 2) 90 90 book listbook rcPendingFS … … 131 131 book getword rcPendingFS $pageName dist_dir -var DIST_DIR 132 132 # book getword rcPendingFS $pageName clean -var CLEAN 133 book getword rcPendingFS $pageName prod_id -var PROD_ID133 book getword rcPendingFS $pageName dest_id -var DEST_ID 134 134 book getword rcPendingFS $pageName product_name -var PRODUCT_NAME 135 135 book getword rcPendingFS $pageName ds_dbhost -var DS_DBHOST … … 141 141 host anyhost 142 142 143 sprintf logfile "%s/makefs.%s.%s.log" $DIST_DIR $DIST_ID $ PROD_ID143 sprintf logfile "%s/makefs.%s.%s.log" $DIST_DIR $DIST_ID $DEST_ID 144 144 stdout $logfile 145 145 stderr $logfile … … 147 147 book setword rcPendingFS $pageName pantaskState RUN 148 148 149 $run = dist_make_fileset.pl --dist_id $DIST_ID --target_id $TARGET_ID --stage $STAGE --stage_id $STAGE_ID -- prod_id $PROD_ID --product_name $PRODUCT_NAME --ds_dbhost $DS_DBHOST --ds_dbname $DS_DBNAME --dist_dir $DIST_DIR149 $run = dist_make_fileset.pl --dist_id $DIST_ID --target_id $TARGET_ID --stage $STAGE --stage_id $STAGE_ID --dest_id $DEST_ID --product_name $PRODUCT_NAME --ds_dbhost $DS_DBHOST --ds_dbname $DS_DBNAME --dist_dir $DIST_DIR 150 150 151 151 add_standard_args run … … 184 184 185 185 stdout NULL 186 stderr $LOG DIR/rcserver.checkstatus.load.log186 stderr $LOGSUBDIR/rcserver.checkstatus.load.log 187 187 188 188 task.exec … … 241 241 242 242 stdout NULL 243 stderr $LOG DIR/rcserver.checkstatus.run.log243 stderr $LOGSUBDIR/rcserver.checkstatus.run.log 244 244 245 245 book setword rcPendingDest $pageName pantaskState RUN 246 246 book getword rcPendingDest $pageName dest_id -var DEST_ID 247 book getword rcPendingDest $pageName prod_id -var PROD_ID247 book getword rcPendingDest $pageName dest_id -var DEST_ID 248 248 book getword rcPendingDest $pageName status_uri -var STATUS_URI 249 249 book getword rcPendingDest $pageName last_fileset -var LAST_FILESET … … 252 252 host anyhost 253 253 254 $run = rcserver_checkstatus.pl --dest_id $DEST_ID -- prod_id $PROD_ID --status_uri $STATUS_URI --last_fileset $LAST_FILESET254 $run = rcserver_checkstatus.pl --dest_id $DEST_ID --dest_id $DEST_ID --status_uri $STATUS_URI --last_fileset $LAST_FILESET 255 255 add_standard_args run 256 256 -
trunk/ippTools/share/disttool_pendingfileset.sql
r25493 r25567 6 6 CONCAT_WS('.', distRun.outroot, CONVERT(distRun.dist_id, CHAR)) as dist_dir, 7 7 rcDestination.name AS product_name, 8 rcDestination. prod_id,8 rcDestination.dest_id, 9 9 rcDestination.dbname AS ds_dbname, 10 10 rcDestination.dbhost AS ds_dbhost -
trunk/ippTools/src/disttool.c
r25517 r25567 903 903 // required values 904 904 PXOPT_LOOKUP_S64(dist_id, config->args, "-dist_id", true, false); 905 PXOPT_LOOKUP_S64( prod_id, config->args, "-prod_id", true, false);905 PXOPT_LOOKUP_S64(dest_id, config->args, "-dest_id", true, false); 906 906 907 907 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); … … 913 913 0, // fs_id 914 914 dist_id, 915 prod_id,915 dest_id, 916 916 name, 917 917 "full", … … 928 928 PXOPT_COPY_S64(config->args, where, "-fs_id", "fs_id", "=="); 929 929 PXOPT_COPY_S64(config->args, where, "-dist_id", "rcDSFileset.dist_id", "=="); 930 PXOPT_COPY_S64(config->args, where, "- prod_id", "prod_id", "==");930 PXOPT_COPY_S64(config->args, where, "-dest_id", "dest_id", "=="); 931 931 PXOPT_COPY_STR(config->args, where, "-stage", "stage", "==");; 932 932 PXOPT_COPY_S64(config->args, where, "-stage_id", "stage_id", "=="); … … 1056 1056 PXOPT_COPY_S64(config->args, where, "-dist_id", "dist_id", "=="); 1057 1057 PXOPT_COPY_S64(config->args, where, "-dest_id", "dest_id", "=="); 1058 PXOPT_COPY_S64(config->args, where, "-prod_id", "prod_id", "==");1059 1058 PXOPT_COPY_S64(config->args, where, "-target_id","target_id", "=="); 1060 1059 PXOPT_COPY_S64(config->args, where, "-fs_id", "fs_id", "=="); … … 1455 1454 psMetadata *where = psMetadataAlloc(); 1456 1455 PXOPT_COPY_S64(config->args, where, "-dest_id", "dest_id", "=="); 1457 PXOPT_COPY_S64(config->args, where, "-prod_id", "prod_id", "==");1458 1456 1459 1457 PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false); … … 1477 1475 // last_fileset normally gets set by updatercrunMode 1478 1476 // Allowing it to be set here might cause problems 1479 // especially since we are allowing selection by prod_id1477 // especially since we are allowing selection by dest_id 1480 1478 if (last_fileset) { 1481 1479 psStringAppend(&query, " %s last_fileset = '%s'", sep, last_fileset); -
trunk/ippTools/src/disttoolConfig.c
r25510 r25567 146 146 psMetadata *addfilesetArgs = psMetadataAlloc(); 147 147 psMetadataAddS64(addfilesetArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 148 psMetadataAddS64(addfilesetArgs, PS_LIST_TAIL, "- prod_id", 0, "define prod_id", 0);148 psMetadataAddS64(addfilesetArgs, PS_LIST_TAIL, "-dest_id", 0, "define dest_id", 0); 149 149 psMetadataAddStr(addfilesetArgs, PS_LIST_TAIL, "-name", 0, "define file name", NULL); 150 150 psMetadataAddS32(addfilesetArgs, PS_LIST_TAIL, "-fault", 0, "define fault code", 0); … … 161 161 psMetadataAddS64(revertfilesetArgs, PS_LIST_TAIL, "-fs_id", 0, "define fs_id", 0); 162 162 psMetadataAddS64(revertfilesetArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 163 psMetadataAddS64(revertfilesetArgs, PS_LIST_TAIL, "- prod_id", 0, "define dist_id", 0);163 psMetadataAddS64(revertfilesetArgs, PS_LIST_TAIL, "-dest_id", 0, "define dist_id", 0); 164 164 psMetadataAddStr(revertfilesetArgs, PS_LIST_TAIL, "-stage", 0, "define stage", NULL); 165 165 psMetadataAddS64(revertfilesetArgs, PS_LIST_TAIL, "-stage_id",0, "define stage_id", 0); … … 173 173 psMetadataAddS64(queuercrunArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 174 174 psMetadataAddS64(queuercrunArgs, PS_LIST_TAIL, "-dest_id", 0, "define dest_id", 0); 175 psMetadataAddS64(queuercrunArgs, PS_LIST_TAIL, "-prod_id", 0, "define prod_id", 0);176 175 psMetadataAddS64(queuercrunArgs, PS_LIST_TAIL, "-target_id", 0, "define target_id", 0); 177 176 psMetadataAddS64(queuercrunArgs, PS_LIST_TAIL, "-fs_id", 0, "define fs_id", 0);
Note:
See TracChangeset
for help on using the changeset viewer.
