NAME

gx-db-request - Submit a requests for a TGCDB update


SYNOPSIS

gx-db-request -help

gx-db-request [options]


DESCRIPTION

gx-db-request is part of the gx-map system and of the optional TGCDB (TeraGrid Central Database) subsystem. This subsystem specific to the TeraGrid; it may or may not be installed on your system.

gx-db-request is normally run either from a cron job or in response to an incoming AMIE packet. It creates a new db-request file to be processed by gx-db-check-requests.

Unlike the gx-request command, gx-db-request is an administrative command, not intended to be used by end users.

The gx-db-request command must be executed by the account that owns the gx-map installation; this is typically the ``gxmap'' or ``globus'' account, but a different account can be configured when the gx-map system is installed.

There are three kinds of db-requests:

full-query
This specifies a full query of the TGCDB for all user/DN mappings for a given resource name. This allows the gx-map TGCDB subsystem to get a current and accurate view of the information in the database.

add
This specifies that one or more mappings are to be added. The request includes a single user name and one or more DNs.

remove
This specifies that one or more mappings are to be removed. The request includes a single user name and one or more DNs.

The gx-db-request command can be used in any of several ways:

You can periodically invoke gx-db-request -full-query from a cron job. This is a good way to keep the mapping information synchronized, but it can place a burden on the database server if multiple sites are performing frequent queries. If this option is chosen, TeraGrid sites should coordinate to choose a reasonable interval (one hour, perhaps?) and to stagger their requests to minimize the impact.

You can invoke gx-db-request -add in response to each incoming AMIE RUM(replace) packet, and gx-db-request -remove in response to each AMIE RUM(delete) packet. This will minimize the impact on the database server, and it should theoretically keep everything synchronized. Before doing this, you should run gx-db-request -full-query to initialize the local copy of the TGCDB mapping information.

Other combinations are possible. For example, you can invoke gx-db-request -full-query in response to each incoming AMIE RUM packet, ignoring the content of the packet. You can then control how often the actual queries are performed by controlling the frequency of the gx-db-check-requests command. (If gx-db-check-requests sees multiple full-query requests, it will only perform one full query.) This has the advantage of using full queries to synchronize the mapping information more reliably, while avoiding submitting queries if no AMIE RUM packets have been received recently.

The best choice is going to depend on a number of factors: how big a burden is actually placed on the database, how many systems are running this software, how often AMIE RUM packets are actually sent out, and so forth.


OPTIONS

Option processing is done using the Perl Getopt::Long module.

Options may be specified with a single or double leading '-' character. Option names may be abbreviated to whatever is unique. Arguments may be separated either by a blank or by an '=' character. For example, ``-foobar 42'', ``--foobar=42'', and ``-foob 42'' would all be equivalent.

-help
Display a usage message and exit.

-version
Display the software version number and exit.

-add
Submit an add request. Requires exactly one -username option and either a -dn-list-file option or one or more -dn options.

-remove
Submit a remove request. Requires exactly one -username option and either a -dn-list-file option or one or more -dn options.

-username USER
Unix user name to be used with -add or -remove.

-dn DN
A DN (Distinguished Name or Subject Name) associated with the specified user, to be added or removed. This option may be given multiple times, but may not be used with the -dn-list-file option. The DN should be enclosed in double quotes, since it's likely to contain special characters (avoid single quotes since some people's names include apostrophes).

-dn-list-file FILE
Read a list of DNs from a specified text file. Each line is treated as a complete DN; comments are not supported, and white space is not ignored. Use -dn-list-file - to read from stdin. This option may not be used with the -dn option. It is intended to avoid problems with very long command lines when multiple DNs are needed.

-full-query
Submit a full-query request. The -username, -dn, and -dn-list-file options may not be used with this option.

-debugging
Enable debugging output. This is intended for developer testing only.


SEE ALSO

gx-map(7), gx-db-check-requests(8), gx-propagate(8)


AUTHOR

Keith Thompson, San Diego Supercomputer Center, <kst@sdsc.edu>


COPYRIGHT AND LICENSE

See the file LICENSE in the gx-map distribution, installed in the etc/gx-map subdirectory.