Team 3: Spam'n Beans
The repman utility : A Fault-Injector and Replication
Manager
|
Description:
The repman utility is useful both as a Fault injector and a
simple Replication Manager and Factory. It will be used during the
development and testing of the Spam'n Beans project.
The utility supports 3 functions. These functions, and the associated
syntax are listed in the following table:
Mode |
Syntax |
Description |
1 |
repman -p <program & args> -l <label> [-m <machine>] |
Launching programs |
2 |
repman |
Listing programs it has launched |
3 |
repman -k <label> |
Terminating (Killing) programs it has launched |
A description of each mode is as follows:
Mode1 : Launch programs
This mode is used to launch programs. This mode uses two required switches
and one optional switch.
- The required -p switch specifies the program and any command-line
arguments to be launched.
- The required -l switch specifies a label to be associated with the
launched program. Valid labels are simple alpha-numeric strings.
- The optional -m switch specifies the name or IP address of the machine
on which the program should be executed. If the -m switch is absent, then
the local machine will be assumed.
Note: The behavior from supplying an invalid remote machine or label is
undefined.
Mode 2 : Listing Program Labels
This mode lists all the labels of programs specified by the user when
launching them via the repman utility. These labels may be
used to terminate the program in mode 3.
The format of the listing appears in the following format:
<label1> <machine1>
<label2> <machine2>
...
Each column is separated by a space and each line is terminated by a newline
('\n') character.
Only the labels for executing programs will be listed. A program
launched from repman that has terminated for any reason will
not appear in the listing. This includes programs which have
terminated due to:
- normal program termination
- explicit program termination using repman (see mode3)
- a process failure in the executing program
- some other external kill signaled to the executing program
Mode 3 : Killing Programs
This mode terminates (kills) the program that is associated with the
specified label.
Note: The behavior from supplying an invalid label for termination is
undefined.
Known Limitations:
The following are known limitations of the repman utility:
- Use of repman assumes that the following environment
variables are properly set: HOME, HOSTNAME, USER
- The repman utility allows only a single process with a
given label.
- The repman utility is not thread safe. It assumes
non-simultaneous execution by any given user.
- The repman utility requires version 4.0 or later of
screen.
- Use of repman assumes that the user does not manually
create screen sessions with the specified screen prefix.
- The repman utility assumes that the userid of the user is
the same on the local machine as it is on the remote machine.
Use Cases
The following are use cases for the repman utility.
Test Number |
1 |
Functionality |
Requirements Mode 1 |
Use Case |
Test ability of repman to launch multiple processes on both local
and remote machines |
Test distribution |
|
Test Sequence |
- From a terminal on go.ece.cmu.edu execute the following:
repman -p top -l pslocal1
repman -p top -l pslocal2
repman -p top -l pslocal3
repman -p top -l psremote1 -m settlers.ece.cmu.edu
repman -p top -l psremote2 -m settlers.ece.cmu.edu
ps -x
- Verify that processes for pslocal1, pslocal2, and pslocal3 appear
- From a terminal on settlers.ece.cmu.edu execute the following:
ps -x
- Verify that processes for "psremote1" and
"psremote2" exists
|
Configuration/Deployment Issues |
None |
Known problems |
None |
Test Number |
2 |
Functionality |
Requirements Mode 2 |
Use Case |
Test the ability of repman to only list labels for executing processes
previously launched by repman (on both local and remote
machines) |
Test distribution |
|
Test Sequence |
- Follow test sequence for test 1 above
- From a terminal on go.ece.cmu.edu execute the following:
repman
- Verify that the output is displayed as follows:
pslocal1 go.ece.cmu.edu
pslocal2 go.ece.cmu.edu
pslocal3 go.ece.cmu.edu
psremote1 settlers.exe.cmu.edu
psremote2 settlers.exe.cmu.edu
- Use the external 'kill' utility to kill the process for pslocal3 on
go.ece.cmu.edu
- Use the external 'kill' utility to kill the process for psremote2 on
go.ece.cmu.edu
- From a terminal on go.ece.cmu.edu execute the following:
repman
- Verify that the output is displayed as follows:
pslocal1 go.ece.cmu.edu
pslocal2 go.ece.cmu.edu
psremote1 settlers.exe.cmu.edu
|
Configuration/Deployment Issues |
None |
Known problems |
None |
Test Number |
3 |
Functionality |
Requirements Mode 3 |
Use Case |
Test ability of repman to kill only those processes specified by label
on both local and remote machines |
Test distribution |
|
Test Sequence |
- Follow test sequence for all tests above
- From a terminal on go.ece.cmu.edu execute the following:
repman -k pslocal2
repman
- Verify that the output is displayed as follows:
pslocal1 go.ece.cmu.edu
psremote1 settlers.exe.cmu.edu
- From a terminal on go.ece.cmu.edu execute the following:
ps -x
- Verify that the process for pslocal2 no longer appears, but the process for pslocal1 does still appear
- From a terminal on go.ece.cmu.edu execute the following:
repman -k psremote1
repman
- Verify that the output is displayed as follows:
pslocal1 go.ece.cmu.edu
- From a terminal on settlers.ece.cmu.edu execute the following:
ps -x
- Verify that the process called "psremote1" no longer
appears
|
Configuration/Deployment Issues |
None |
Known problems |
None |
$Id: repman.html,v 1.3 2004/02/17 20:22:15 pmwilson Exp $