Video Transcript
Slide 01
Hello, this is Amir Shehata with another quick tip on the LUTF. In this video we will take a 5-minute tour over how the LUTF is structured. Then we'll run it and see it in action.
Slide 02
I have written a step by step walk-thru on how to build and deploy the LUTF. Please go to the link provided here or in the video transcript on the wiki for more details.
Slide 03
Once you have the Lustre tests rpm installed along with the other lustre rpms, you can see the LUTF installed in:
Code Block |
---|
/usr/lib64/lustre/tests/lutf |
Slide 04
The LUTF directory structure is fairly straight forward.
The top level directory contains the LUTF binary and a set of other generated shared libraries and python files.
These include the C/Python wrappers which the LUTF python scripts use to call the C APIs.
Slide 05
As an example you can see two files of interest there: _lnetconfig.so
and lnetconfig.py
.
The .py file is generated by SWIG an enables the LUTF python scripts to call the liblnetconfig API
The .so file is a shared library which includes the glue code which implements the liblnetconfig API calls
Slide 06
The python
directory includes configuration scripts under the config
directory.
Various infrastructure scripts, which implement the remote script execution feature, are under the infra
directory.
Lustre and LNet specific infrastructure scripts, such as scripts to clean the test setup and configure LNet are located in the tests-infra
directory
Finally all the various tests suites are located under the tests
directory.
At this time the shown test suites are available.
Slide 7
The LUTF requires a requires one single YAML configuration file which specifies its environment. Before we start the LUTF let's breifly explore the configuration parameters.
If you remember I mentioned that the LUTF can run in master or agent mode. Some parameters are relevant to the agent and not the master.
Although all parameters can be specified. On startup only the parameters which matter are examined.
First off, the shell parameter defines how the LUTF will run. There are three modes it can run in:
In a later tutorial I'll show how the YAML configuration file can be generated automatically.
For now we'll use a default one, which can be downloaded from the link provided.
Let's skim over the configuration file and explain the fields in there
- agent: tells th
Running a single version of the LUTF
- interactive: In this mode you can access the python shell, type in command. I'll show that shortly.
- daemon: As the name suggests the LUTF will run as a deamon, although its shell can still be access by telneting to it.
- batch: This mode is unique to the master and it basically runs all the specified tests and then shuts down.
The agent parameter tells the LUTF if it should run as a master or an agent
node-name specifies the name of the node.
The agent will need to know both the master IP address or hostname as well as a symbolic name to use for the master.
The LUTF will require a port to listen on for incoming connections as well as a port to use for the telnet server
Slide 8
This is what the LUTF YAML configuration looks like. A couple of other parameters relevant to the master node are:
- suite: which defines a suite name to run when in batch mode. If nothing is specified the LUTF will run all available suites
- script: This defines the script name to run and it's only valid if a suite is provided.
Both the suite and the script names can contain wild cards which define a group of suites or scripts.
You can follow the shown link for more details on the configuration parameters.
Before I leave this, I just want to remind you that you really don't need to worry about that configuration file too much, as it will be automatically generated for you, as I'll show you later on.
Slide 9
We're almost ready to run the LUTF, but first just a quick note on a couple of important naming conventions.
All test suites under the python/tests
directory need to start with the literal: suite_
And all the tests under a test suite need to start with the literal: test_
Otherwise the LUTF will not pick them up and you won't be able to run them.
LUTF YAML Configuration
Code Block |
---|
lutf:
shell: interactive # [interactive|batch|daemon]
agent: false # [true|false] run as an agent or master
telnet-port: 49304 # a port to telnet to, to access agent
master-address: 192.14.4.3 # IP address of master or hostname
master-port: 43943 # port master is listening on
node-name: ost2_HOST # name to associate with the node.
master-name: mds_HOST # name of master to be given to agents
script: test_dlc_01.py # script name to run in batch mode. Suite name needs to be specified as well.
suite: suite_dlc # suite name to run. If not present all suites are run in batch mode
lutf-path: /usr/lib64/lustre/tests/lutf/ # path to lutf directory
py-path: "/usr/lib64/:/usr/lib64/tests" # ':' separated lists of paths for extra python modules |
...