CDBVER
Summary
This command performs disk and database verification that the installation
of a particular CDBS release catalog was successful, and that the catalog
and SQL files pertain to the same set of data. It verifies that for
each reference file or table installed for a catalog, that there is at
least one database row that references the new file.
Description
For each release catalog specified, a check is made to make sure the files
listed in the catalog exist in the reference file directories. Next,
each reference file or table insertion is verified to have an entry in
the corresponding reference relation for that instrument and file type.
The following database relations are checked:
-
STIS - ccao_stis_ref
-
NICMOS - ccan_nicmos_ref
-
WF2 - ccau_wf2_ref
-
FOC - ccab_foc_ref
-
FOS - ccac_fos_ref
-
HRS - ccad_hrs_ref
-
WFPC - ccaa_wfc_ref
For every instrument except STIS, reference tables and multi-instrument
tables are listed in the caltable relation. STIS stores
both reference file and table information in ccao_stis_ref.
There are no database relations used to hold the names of throughput tables,
so these are not verified.
NOTE: This command does NOT catch the problem that occurs if the CDBS
SQL contains an insert statement for a reference file that we did not receive.
This would require a parsing of the CDBS-provided SQL, and has not been
needed so far. It DOES catch the case where a new reference file
was received, but no corresponding SQL insert statement was performed.
Usage
cdbver release_name path_name [-localfiles] [-checkonly]
The flags (preceded by a dash '-') are optional and can be specified
in any order by any number of unique characters (e.g. -localfiles, -loc,
-l are treated equally). The positional parameters 'release_name' and 'path_name'
are required and MUST occur in the order listed.
Input
CDBS catalog file(s).
OPUS path file.
OPUS resource file.
Output
Constraints
The database verification reads
are performed against the database defined by the OPUS_DB and DSQUERY environment
variables.
This tool does NOT perform
the more difficult check of verifying that each database insert performed
by the CDBS SQL refers to a file that is now installed in a reference file
directory. Even after running CDBVER, it is still theoretically
possible for CDBS to deliver SQL that contains insert statements for reference
files that we did not receive. This has never happened, to date.
CDBVER will catch the case if new reference files ARE delivered but no
corresponding SQL insert statement was performed.
Resource File
Required Command-Line Arguments
release_catalog_mask (required)
A newly released catalog file name. Wild card names are permitted.
Will be searched for in CDB_CATALOG_IN_DIR unless the -localfiles flag
is set on the command line, in which case the current directory is used.
path_file_name (required)
An OPUS path file providing resource values. The full path name is
required (OPUS_DEFINITIONS_DIR is not automatically prepended).
Optional Command-Line Arguments
-c[heck_only]
Optional flag specifying that only catalog verification is performed.
This consists of locating the files listed in the catalog on disk and verifying
that sufficient free disk space exists to perform the installation. No
disk changes are made in this mode.
-l[ocalfiles]
Optional flag specifying that CDBDB will look in the current working
directory for the release catalogs. If no catalogs are found, no processing
will be performed.
Examples
$ cdbver opus_101_z.cat OPUS_DEFINITIONS_DIR:blue.path
Verifies that the files listed in the catalog opus_101_z.cat
exist in the reference file directories, and that at least one row in a
database reference file relation refers to each one.