DESCRIPTION
The rgy_admin tool administers registry servers. It can view or modify
the registry replica list, reinitialize replicas, delete replicas, stop
servers, and change the registry master site.
Note that rgy_admin cannot add, delete, or modify data entries contained
in the registry database, such as names and accounts; use edrgy to
perform these tasks. To create a registry replica or to restart a
server, use rgyd, the registry daemon.
Once invoked, rgy_admin enters an interactive mode in which it accepts
the commands described in the next section.
COMMANDS
Most rgy_admin commands operate on a default host. You use the set
command to establish the default host, which is remembered until changed
by another set. In the following command descriptions, we identify the
default host as default_host. If a command operates on a host other than
the default, we identify this host as other_host.
Several of the rgy_admin commands require you to set the default host to
the master registry site.
The host name you supply as a default_host or other_host takes the form
family:host or host. The only currently supported family is dds, the
Domain protocol family. You can specify a host in this family by its
entry directory or by its network address. For example, dds://clara,
//clara, dds:#1234.abcd, and #1234.abcd are all acceptable host names.
become [ -master ] [ -slave ] [ -ro | -wr ]
The -master option causes the replica at default_host (which
must be a slave replica) to become the master. This operation
can cause updates to be lost; the change_master command is the
preferred means of designating a different master replica.
The -slave option causes the replica at default_host (which
must be the master replica) to become a slave. This operation
can cause updates to be lost; the change_master command is the
preferred means of designating a different master replica.
The -ro option makes the replica list read-only. The
default_host must be set to the master registry site.
The -wr option makes the replica list writable. The
default_host must be set to the master registry site.
change_master -to other_host
Change the master replica of the registry from default_host to
other_host. The default_host must be set to the master
registry site.
The current master server copies its database to the replica at
other_host, becomes a slave, then tells the replica at
other_host to become the master.
delrep other_host [ -force ]
Delete the registry replica at other_host. The default_host
must be set to the master registry site.
The master server marks the replica at other_host as deleted
and propagates the deletion to all other replicas on its list.
When it has actually delivered the delete request to the
replica at other_host, the master server removes that replica
from its own replica list.
The -force option causes a more drastic delete. It deletes
other_host from the replica list at the master registry, which
then propagates the delete request to the replicas at the hosts
that remain on its list. Since this operation never
communicates with the deleted replica, you should use -force
only when the replica has died irrecoverably. If you use
-force while the replica at other_host is still running, you
should then reset the deleted replica.
help List the rgy_admin commands and show their allowed
abbreviations.
info Get status information about the replica at default_host.
initrep other_host
Reinitialize the registry server at other_host. The
default_host must be set to the master registry site. The
other_host must be a slave site.
The master registry copies its entire database (or that of
another up-to-date replica) to the replica at other_host.
lrep [ -state ] [ -na ]
List the registry replica sites as stored in the replica list
at default_host.
The -state option shows the current state and update time on
each host.
The -na option shows the network address of each host.
monitor [ -r m ]
Periodically list the registry replica sites as stored in the
replica list at default_host and show the current state and
update time at each site.
The -r option causes the sites to be listed every m minutes.
If you omit this option, the period is 15 minutes.
quit Quit the rgy_admin session.
reprep other_host
Replace the network address for other_host in the registry
replica list. The default_host must be set to the master
registry site.
The master replica propagates the new network address for
other_host to all other registry replica lists. Use this
command only if a replica site's network number changes.
reset other_host
Reset the registry replica at other_host. The registry server
at other_host deletes its copy of the registry and stops
running. This command does not delete other_host from any
replica lists.
set [ -h host_name | -m ]
Set the default host. Subsequent commands that do not specify
a host will go to this host.
The -h option specifies a replica to use as the default.
The -m option causes the master replica to be the default.
With no options, set locates a registry replica and sets it as
the default.
site [ host_name ]
If host_name is specified, the command sets the default host.
If host_name is not specified, the command gets status
information about default_host.
state -in_maintenance | -not_in_maintenance
Put the master registry server into maintenance state or take
it out of maintenance state. The default_host must be set to
the master registry site.
With the -in_maintenance flag, state causes the master registry
server to save its database onto disk and refuse any updates.
With the -not_in_maintenance flag, state causes the master
registry server to reload its database from disk, return to its
normal "in service" state, and (if its database and/or replica
list are writable) start accepting updates.
stop Stop the registry server that is running at default_host.
EXAMPLES
Start rgy_admin, list the replicas and their states, then set the default
host to the master replica:
$ /etc/rgy_admin
Default object: rgy default host: dds://george
State: in service slave
rgy_admin: lrep -st
(master) dds://martha state: in service 1987/11/16.12:46:59
dds://george state: in service 1987/11/16.12:46:59
dds://thomas state: in service 1987/11/16.12:46:59
rgy_admin: set -m
Default object: rgy default host: dds://martha
State: in service master replica list is writeable