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.

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:

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 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
  1. 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
    
  2. Verify that processes for pslocal1, pslocal2, and pslocal3 appear
  3. From a terminal on settlers.ece.cmu.edu execute the following:
    ps -x
  4. 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
  1. Follow test sequence for test 1 above
  2. From a terminal on go.ece.cmu.edu execute the following:
    repman
  3. 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
    
  4. Use the external 'kill' utility to kill the process for pslocal3 on go.ece.cmu.edu
  5. Use the external 'kill' utility to kill the process for psremote2 on go.ece.cmu.edu
  6. From a terminal on go.ece.cmu.edu execute the following:
    repman
  7. 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
  1. Follow test sequence for all tests above
  2. From a terminal on go.ece.cmu.edu execute the following:
    repman -k pslocal2
    repman
    
  3. Verify that the output is displayed as follows:
    pslocal1 go.ece.cmu.edu
    psremote1 settlers.exe.cmu.edu
    
  4. From a terminal on go.ece.cmu.edu execute the following:
    ps -x
  5. Verify that the process for pslocal2 no longer appears, but the process for pslocal1 does still appear
  6. From a terminal on go.ece.cmu.edu execute the following:
    repman -k psremote1
    repman
    
  7. Verify that the output is displayed as follows:
    pslocal1 go.ece.cmu.edu
  8. From a terminal on settlers.ece.cmu.edu execute the following:
    ps -x
  9. 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 $