GT 3.9.5 RLS : System Administrator's Guide
- Introduction
- Building and Installing
- Configuring
- Deploying
- Testing
- Security Considerations
- Troubleshooting
Introduction
This guide contains advanced configuration information for system administrators working with RLS. It provides references to information on procedures typically performed by system administrators, including installation, configuring, deploying, and testing the installation.
This information is in addition to the basic installation instructions in the GT 3.9.5 System Administrator's Guide.
Building and Installing
This procedure includes the steps required to set up an RLS server. Post setup configuration (tuning the server parameters etc) are not included in this document.
This procedure includes the following sections:
If using PostgreSQL:
If using MySQL:
- Installing the RLS Server
- Configuring the RLS Database
- Configuring the RLS Server
- Starting the RLS Server
- Configuring RLS for WS Index Service
- Redhat 9 Incompatibility
You need to download and install the following software (follow the links to download):
|
|||||||||||
| 1 | The following environment variables can be used to override the default locations. These should be set prior to installing the RLS server. The location of iODBC and the odbc.ini file must be specified before installing the RLS server. Also if you're using MySQL its top level installation directory must be specified.By default these are assumed to be in $GLOBUS_LOCATION. In addition if you're building from source and wish to build the client Java API (included in the server bundles) you need to set the path to the Java Development Toolkit (JDK) version 1.4 or later.
You can use the following commands to set these variables. You only need to set these variables for RLS installation, they are not used when running RLS. This document assumes you are using the csh shell or one of its variants, if you're using sh or something similar (eg bash ) you should change the setenv commands to export variable=value .
|
||||||||||
| 2 | The following commands were used during RLS development to install iODBC version 3.0.5. cd $IODBCSRC where: $IODBCSRC is the directory where you untarred the iODBC sources $ODBCINIDIR is the directory where you plan to install the |
||||||||||
| 3 | Create the The contents should include the path to where you intend to install
the ODBC driver for your RDBMS (such as The
following is an example that should work with psqlODBC. It assumes
you will name your LRC and RLI databases [ODBC Data Sources] Note: You do not need an RLI database if you plan to use Bloom filters for LRC to RLI updates (Bloom filters are kept in memory), in this case you can omit the RLI entries below. Bug: psqlODBC will not find a Data Source Name (DSN) in the system odbc.ini file $ODBCINIDIR/odbc.ini . It will find DSNs in the user's odbc.ini file if it exists <$HOME/.odbc.ini). One work around is to copy or symlink the system odbc.ini file
to each user's home directory. psqlODBC does find system DSNs in a
file called odbcinst.ini , which is looked for in the etc subdirectory
where iODBC was installed $GLOBUS_IODBC_PATH/etc/odbcinst.ini .
So another option besides creating user .odbc.ini files is
to copy or symlink the system odbc.ini file to $GLOBUS_IODBC_PATH/etc/odbcinst.ini .
Someone who understands this better may have a better answer. |
||||||||||
| 4 | If you're using MySQL and changed how how MySQL clients
connect to the MySQL server in my.cnf (eg the port number or
socket name) then you should set option to [lrc1000] |
||||||||||
| 5 | The commands used to install Postgres 7.2.3 on the RLS development system were as follows. cd $POSTGRESSRC $POSTGRESSRC is the directory where the PostgreSQL source was untarred. |
||||||||||
| 6 | Initialize PostgreSQL and start the server by running: initdb -D /path/to/postgres-datadir
The |
||||||||||
| 7 | Create the database user (in our example, called createuser -P dbuser Important: Be sure to do periodic |
||||||||||
The following commands were used to install psqlODBC 7.2.5. |
|||||||||||
| 8 | Install psqlODBC by running the following commands cd $PSQLODBCSRC $PSQLODBCSRC is the directory where you untarred the psqlODBC source: Note: The configure script that comes with psqlODBC supports
a |
||||||||||
Once you've installed and configured MySQL you must start the database server and create the database user/password that RLS will use to connect to the database. |
|||||||||||
| 9 | Start the database server by running: mysqld_safe [--defaults-file path to your my.cnf file ] |
||||||||||
| 10 | To create the database user and password that RLS will use you must run the MySQL command line tool mysql , and specify the following commands. mysql> use mysql; These commands assume the username you will create for RLS is Creation of the LRC and/or RLI databases is covered below in the section RLS Server Database Configuration |
||||||||||
Recommended Version: 3.51.06 It also assumes that iODBC was installed in $GLOBUS_LOCATION, this may be changed by changing the --with-iodbc-includes and --with-iodbc-libs options. |
|||||||||||
| 11 | Install MyODBC in $GLOBUS_LOCATION (you may choose a different directory if you wish, by changing the --prefix option to configure below.) cd $MYODBCSRC
where: $MYODBCSRC is the directory where you untarred the MyODBC sources. $ODBCINIDIR is the directory where you created the odbc.ini file. Bug: There is a bug in MyODBC version 3.51.05 and earlier.
The debug code is not thread safe, and the RLS server will get a segmentation
violation and die if this code is enabled. In versions 3.51.05 and later
the debug code can be disabled with the configure option setenv CFLAGS -DBUG_OFF |
||||||||||
| 12 | Download the appropriate bundle. RLS is included as part of the Globus Toolkit bundle. See the Globus Toolkit Development Downloads for a listing of available software. Note: When using these bundles, RLS will not be built by the installer script unless the environment variable GLOBUS_IODBC_PATH is set. | ||||||||||
| 13 |
RLS is installed as a part of the standard install. For basic installation instructions, see the Installation Guide |
||||||||||
RLS server configuration is specified in $GLOBUS_LOCATION/etc/globus-rls-server.conf, please see the main page globus-rls-server(8) for
complete details. Some of the configuration options (such as database user/password)
are mentioned below. |
|||||||||||
| 14 | Create a database user that the RLS server will use to connect to the DBMS. The database user and password you pick must be specified in the RLS server configuration file, as well as the name of the database(s) you will create (see below). db_user dbuser |
||||||||||
| 15 | Decide which database(s) the RLS server will use (and that you will create in step ?): If the RLS server is a Local Replica Catalog (LRC) server you will need to create the LRC database. If the server is a Replica Location Index (RLI) server, you may need to create a RLI database. An RLI server can receive updates from LRC servers in one of two forms, as LFN lists (in which case the RLI database must be created), or highly compressed Bloom filters. Since Bloom filters are so small, they are kept in memory and no database is required. An RLS server can be configured as both an LRC and RLI server. |
||||||||||
| 16 | Configure the schema file(s) for the database(s) you will create. GT3.2 installed the schema files for the LRC and RLI databases in $GLOBUS_LOCATION/setup/globus. There are separate files for PostgreSQL and MySQL:
Edit these files to set the name of the database user
you created for RLS, and the names of the databases configured in By default the database user is dbuser , the LRC database name is lrc1000 and the RLI database name is rli1000. |
||||||||||
| 17 | Create the database(s) with the following commands (note once again that you do not need to create an RLI database if you are configuring an RLI server updated by Bloom filters): For PostgreSQL, run: createdb -O dbuser -U dbuser -W lrc1000 For MySQL, run: mysql -p -u dbuser < $GLOBUS_LOCATION/setup/globus/globus-rls-lrc-mysql.sql |
||||||||||
| 18 | Review the server configuration file A minimal configuration file for both an LRC and RLI server would be: # Configure the database connection info The server uses a host certificate to identify itself to clients. By default this certificate is located in the files /etc/grid-security/hostcert.pem and /etc/grid-security/hostkey.pem . Host certificates have a distinguished name of the form /CN=host/ FQDN . If the host you plan to run the RLS server is on does not have a host certificate you must obtain one from your Certificate Authority. The RLS server must be run as the same user who owns the host certificate files (typically root). The location of the host certificate files may be specified in $GLOBUS_LOCATION/etc/globus-rls-server.conf :
rlskeyfile path-to-key-file # default /etc/grid-security/hostkey.pem It is possible to run the RLS server without authentication, by starting it with the -N option, and using URL's of the form rlsn://server to connect to it. If authentication is enabled RLI servers must include acl configuration options that match the identities of LRC servers that update it, that grant the rli_update permission to the LRCs. |
||||||||||
| 19 | Start the RLS Server by running: $GLOBUS_LOCATION/sbin/SXXrls start Similarly, you can stop the RLS Server by running: $GLOBUS_LOCATION/sbin/SXXrls stop Important: See Notes on Initializing RLS. |
||||||||||
The server package includes a program called globus-rls-reporter that
will report information about an RLS server to the WS Index Service. Use
this procedure to enable this program. |
|||||||||||
| 20 | To enable Index Service reporting add the contents of
the file |
||||||||||
| 21 | If necessary, set your virtual organization (VO) name
in The default value is |
||||||||||
22 |
You must restart your MDS (GRIS) server after modifying $GLOBUS_LOCATION/sbin/SXXgris stop |
||||||||||
Redhat 9 Incompatibility
This note applies to Redhat 9 but could also apply to other Linux distributions.
There have been occurences of RLS servers hanging on Redhat 9 systems.
The external symptoms are:
- The server does not accept new connections from clients, with an error message similar to:
connect(rls://XXXXX): globus_rls_client: IO timeout: globus_io_tcp_register_connect() timed out after 30 seconds
- Often, the server continues to receive and send updates as configured and respond to signals. You can check this by querying other servers that interact with the one that's hung.
Under gdb:
All the server threads are waiting to be signaled on a condition variable. Sometimes, this is in
globus_iofunctions, particularly inglobus_io_cancel().
Probable cause
This seems to be due to a problem in the new kernel and thread libraries
of Redhat 9. A problem in pthread_cond_wait() causes threads
not to wake up correctly.
This problem has been seen with the following kernels and glibc packages:
Kernels:
- 2.4.20-30.9
- 2.4.20-8
glibc:
- glibc-2.3.2-27.9.7
Suggested workaround
The problems don't seem to arise when RLS is linked with older pthread
libraries. This can be done as by adding a couple of lines to the RLS startup
script in $GLOBUS_LOCATION/sbin/SXXrls, as shown:
<--- START ---> #!/bin/sh GLOBUS_LOCATION=/opt/gt3.2 MYSQL=/opt/mysql IODBC=/opt/iodbc export GLOBUS_LOCATION #Redhat 9 workaround LD_ASSUME_KERNEL=2.4.1 export LD_ASSUME_KERNEL <--- END --->
On i586 systems, set LD_ASSUME_KERNEL=2.2.5
Notes on RLS Initialization
Please be advised (and advise other users responsible for bringing up the RLS) that the startup initialization may take a few minutes before the RLS may be accessible. The initialization involves two key operations that may consume significant resources causing the server to appear temporarily unresponsive. Users of RLS may mistakenly assume that RLS failed to startup and may kill the server and start over. Some users may fall into this in a repeated cycle, believing that the RLS is unable to startup properly.
If the RLS is configured to send compressed updates (Bloom filters) to other RLIs, the RLS startup will involve initialization of the Bloom filter representing the current contents of the local replica catalog (LRC). This step is a prerequisite before any additional operations may be allowed, therefore no client connections are permitted until the initialization is complete. In our test environment, we have seen over 30 seconds delay due to creation of the Bloom filter corresponding to 1 million LFN names on a system with Dual 1 GHz CPU and 1.5 GB RAM. You may experience greater delays at larger scales and/or when running RLS with more limited system resources.
If the RLS is configured to send uncompressed updates (LFN lists) to other RLIs, the RLS startup will not involve any additional initialization delay, however, the RLS will spawn an initial full catalog update to all RLIs it updates. Though these updates will take place on separate threads of execution after the initialization of the system, they will consume a great amount of processor activity. Depending on the volume of the local replica catalog (LRC), this processor activity may initially interfere with a client operation. In our test environment, we have seen our initial "globus-rls-admin ping..." operation may suffer a delay and timeout in 30 seconds, the second "ping" may delay for a few seconds but will successfully return, and the third and every subsequent "ping" operation will successfully return immediately throughout the duration of the update. The system exhibits the same behavior for any other client operation, such as a "globus-rls-cli query..." operation.
Configuring
Configuration overview
The globus-rls-server.conf file configures the RLS
server.
If the configuration file is not specified on the command line (see
the -c option) then it is looked for in both:
-
$GLOBUS_LOCATION/etc/globus-rls-server.conf /usr/local/etc/globus-rls-server.confifGLOBUS_LOCATIONis not set
Most command line options for globus-rls-server may also be set in
the configuration file, however command line options always override
items found in the configuration file.
The configuration file is a
sequence of lines consisting of a keyword, whitespace, and a value.
Comments begin with # and end with a newline.
Syntax of the interface
acl user: permission [permission] |
A gridmap file may also
be used to map DNs to local usernames, which in turn are matched
against the regular expressions in the
There may be multiple
|
|
lrc_read |
Allows client to read an LRC. | |
lrc_update |
Allows client to update an LRC. | |
rli_read |
Allows client to read an RLI. | |
rli_update |
Allows client to update an RLI. | |
admin |
Allows client to update an LRC's list of RLIs to send updates to. | |
stats |
Allows client to read performance statistics. | |
all |
Allows client to do all of the above. | |
authentication true|false |
Enable or disable GSI authentication. The default value is If authentication is enabled ( If authentication is not enabled ( |
|
db_pwd password |
Password to use to connect to MYSQL server. The default value is |
|
db_user databaseuser |
Username to use to connect to MYSQL server. The default value is |
|
idletimeout seconds |
Seconds after which idle connections close. The default value is |
|
loglevel N |
Sets loglevel to N (default is 0). Higher levels mean more verbosity. |
|
lrc_bloomfilter_numhash N |
Number of hash functions to use in Bloom filters. The default
value is Possible values are 1 through 8. This value, in conjunction
with Note: The
default values of |
|
lrc_bloomfilter_ratio N |
Sets ratio of bloom filter size (in bits) to number of LFNs in the LRC catalog (in other words, size of the Bloom filter as a multiple of the number of LFNs in the LRC database.) Only meaningful if Bloom filters are used to update an RLI. Too small a value will generate too many false positives, too large wastes memory and network bandwidth. The default value is Note: The default values of |
|
lrc_buffer_time N |
LRC to RLI updates are buffered until either the buffer is full or this much time in seconds has elapsed since the last update. The default value is
|
|
lrc_dbname |
Name of LRC database. The default value is |
|
lrc_server true|false |
If LRC server, the value should
be The default value is |
|
lrc_update_bf seconds |
Interval in seconds between LRC to RLI updates when the RLI is updated by Bloom filters. In other words, how often an LRC server does a Bloom filter softstate update. This can
be much smaller than the interval between updates without using
Bloom filters ( The default value is |
|
lrc_update_factor N |
If lrc_update_immediate mode
is on, and the LRC server is in sync with an RLI server (an LRC
and RLI are synced if there have been no failed updates since the
last full softstate update), then the interval between RLI updates
for this server ( lrc_update_ll )
is multiplied by the value of this option. |
|
lrc_update_immediate true|false |
Turns LRC to RLI immediate mode updates
on ( The default value is |
|
lrc_update_ll seconds |
Number of seconds before an LRC server does a LFN list softstate update. The default value is |
|
lrc_update_retry seconds |
Seconds to wait before an LRC server will retry to connect to an RLI server that it needs to update. The default value is |
|
maxbackoff seconds |
Maximum seconds to wait before re-trying listen in the event of an I/O error. The default value is |
|
maxfreethreads N |
Maximum number of idle threads, excess threads are killed. The default
value is |
|
maxconnections N |
Maximum number of simultaneous connections. The default value is |
|
maxthreads N |
Maximum number of threads running at one time. The default value is |
|
myurl URL |
URL of server. The default value is |
|
odbcini filename |
Sets environment variable If not specified, and |
|
pidfiledir directory |
Directory where pid file should be written. The
default value is |
|
port N |
Port the server listens on. The default
value is |
|
result_limit limit |
Sets the maximum number of results returned by a query. The default value is If a query request includes a limit greater than this
value, an error ( If the query
request has no limit specified, then at most
|
|
rli_bloomfilter true|false |
RLI servers must have this set to accept Bloom filter updates. If If Note: If Bloom filters are enabled, then the RLI does not support wildcarded queries. |
|
rli_bloomfilter_dir none|default|pathname |
If an RLI is configured to accept
bloom filters ( This directory is scanned when an RLI server starts up and is used to initialize Bloom filters for each LRC that updated the RLI. This option is useful when you want the RLI to recover its data immediately after a restart rather than wait for LRCs to send another update. If the LRCs are updating frequently, this option is unnecessary, and may be wasteful in that each Bloom filter is written to disk after each update. |
|
none |
Bloom filters are not saved to disk. This is the default. |
|
default |
Bloom filters are saved to the default directory:
|
|
pathname |
Bloom filters are saved to the named directory. Any other string is used as the directory name unchanged. The Bloom filter files in this directory have the name of the URL of the LRC that sent the Bloom filter, with slashes (/) changed to percent signs (%), and ".bf" appended. |
|
rli_dbname database |
Name of RLI database. The default value is |
|
rli_expire_int seconds |
Interval (in seconds) between RLI expirations of stale entries. In other words, how often an RLI server will check for stale entries in its database. The default value is |
|
rli_expire_stale seconds |
Interval (in seconds) after which entries in the RLI database are considered stale (presumably because they were deleted in the LRC.) The default value is This value should be no smaller than Stale RLI entries are not returned in queries. Note: If the LRC server is responding,
this value is not used. Instead the value of |
|
rli_server true|false |
If RLI server, the value should be
The default value is |
|
rlscertfile filename |
Name of X.509 certificate file identifying server. This value is set by setting environment variable |
|
rlskeyfile |
Name of X.509 key file for server. This value is
set by setting environment variable |
|
startthreads N |
Number of threads to start initially. The
default value is |
|
timeout seconds |
Timeout (in seconds) for calls to other RLS servers (eg for LRC calls to send an update to an RLI). | |
Deploying
This section does not apply to the RLS.
Testing
You can use the programs globus-rls-admin
and globus-rls-cli to test functionality. See their
respective man pages for details on their use.
| 1 | Start the server in debug mode with the command:
$GLOBUS_LOCATION/bin/globus-rls-server -d [-N] The |
| 2 | Ping the server using globus-rls-admin:
$GLOBUS_LOCATION/bin/globus-rls-admin -p rls://serverhost If you disabled authentication (by starting the server with the $GLOBUS_LOCATION/bin/globus-rls-admin -p rlsn://serverhost |
Security Considerations
[describe security considerations relevant for this component]
Troubleshooting
Information on troubleshooting can be found in the FAQ.