Whamcloud - gitweb
LU-2950 lnet: Add a mechanism to configure routes from a file
authorAmir Shehata <amir.shehata@intel.com>
Wed, 1 May 2013 02:01:59 +0000 (19:01 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 2 May 2013 23:25:40 +0000 (19:25 -0400)
commit56e322f722b23d7070c9249dabed02b53397c82e
tree65eaf2aa29ef08c22828bd9592c252df14609090
parentf60b861e3e526d33aa504f90385727ff74f290ba
LU-2950 lnet: Add a mechanism to configure routes from a file

Created a bash script lustre_rotues_config which takes in a file
with routes configured in the following format:
<network>: { gateway: <gateway>, [hop:<hop>], [priority: <prio>] }
The script shall parse the file and generate:
lctl --net <network> add_route <gateway> [hop [priority]]
for each route.
The script can be used to unconfigure routes as well by running it
as follows:

   lustre_routes_config --cleanup <file>

In this case it will remove all routes configures via lctl del_route.

Also added another script: lustre_routes_conversion, which will be
used to convert from legacy syntax for configuring routes to the
new syntax described above. The script can be run on a file which
contains the legacy syntax and will generate a new file with the
passed in name:

   lustre_routes_conversion <legacy file> <new file>

Added two man pages to describe the usages of these scripts

Added a test case in conf-sanity.sh to test the new scripts
lustre_routes_conversion and lustre_routes_config. The test case
takes in a sample routes file which has the old synatx, run the
lustre_routes_conversion script to convert to the new syntax, then
runs the lustre_routes_config script in --dry-run to ensure that
the script configures the routes

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I57f81176c2d926fedefa8ea3be34586aa1ac9d76
Reviewed-on: http://review.whamcloud.com/5757
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/doc/Makefile.am
lustre/doc/lustre_routes_config.8 [new file with mode: 0644]
lustre/doc/lustre_routes_conversion.8 [new file with mode: 0644]
lustre/scripts/Makefile.am
lustre/scripts/lnet
lustre/scripts/lustre_routes_config [new file with mode: 0755]
lustre/scripts/lustre_routes_conversion [new file with mode: 0755]
lustre/tests/conf-sanity.sh