Video Transcript
Hello, this is Amir Shehata with another quick tip for the LUTF.
Now that we have a general understanding of what the LUTF is, how to build it, deploy it and configure it, let's get our hands dirty and run it.
There are three environment variables we need to set in order to run the LUTF:
export LUSTRE=/usr/lib64/lustre export LD_LIBRARY_PATH=$LUSTRE/tests/lutf:$LUSTRE/tests/lutf/src export LUTFPATH=$LUSTRE/tests/lutf
- LUSTRE: is the base directory where the Lustre tests are
- LD_LIBRARY_PATH: is the path for the LUTF shared libraries
- LUTFPATH: is the path to the LUTF binary
With these three environment variables you can really put the LUTF in any directory and it should work.
What I usually do is I add these environment variables in a bash file, say lutf.sh and then source it when I first log in.
Again, I'm explaining the LUTF from the ground up, so you'll realize a bit later on that a method to set these environment variables automatically comes packaged with the LUTF. We'll cover that when we talk about how the LUTF integrates in the existing Lustre test infrastructure.
For now let's just start the LUTF manually and explore it a bit.
Once you have the environment variables set, you'll need to create a YAML configuration parameter to give to the LUTF on start up. We went over the YAML configuration file in a previous tutorial. For today you can download a sample YAML configuration file for the agent and the master from the Wiki paged linked below.
Alright here we go:
source ~/bin/lutf.sh $LUTFPATH/lutf --config $LUTFPATH/python/config/lustre01.yaml
You can see since we're running in interactive
mode we now have an LUTF python shell we can work with.
Right off the bat let's see what we can learn from our test setup.
First of all the LUTF gives us a simple way to look at all the existing suites:
Welcome to the Lustre Unit Test Framework (LUTF) lutf>>> suites.dump() suites: - dlc - dynamic-discovery - lnet-health - multi-rail - samples
Second, we can see all the scripts under a specific suite. I'm going to use my samples suite for this demonstration:
lutf>>> suites['samples'].dump() scripts: - sample_01.py - sample_02.py - sample_03.py - sample_04.py - sample_05.py - sample_04_1.py
We can also display a bunch of information about this node. There is a me
variable available which gives us some information about the node we're running on.
We can find out the name given to this node by the test setup:
lutf>>> me.my_name() 'RCLIENTS'
We can find out the hostname of this node:
lutf>>> me.my_hostname() 'lustre01'
We can find out the listen port for this LUTF instance
lutf>>> me.my_listenport() 8282
We can find out the telnet port for this LUTF instance
lutf>>> me.my_telnetport() 8181
We can also find out the interfaces which this node has:
lutf>>> me.dump_intfs() interfaces: eth0: ip: 192.168.122.100 netmast: 255.255.255.0 broadcast: 192.168.122.255 eth1: ip: 192.168.122.101 netmast: 255.255.255.0 broadcast: 192.168.122.255 eth2: ip: 192.168.122.102 netmast: 255.255.255.0 broadcast: 192.168.122.255
Why is this interesting? Well because a script can just access the "me" variable and get all the basic information it needs about a node in a very simple way. Makes writing test scripts very straight forward as we will see later on.
Beside information about the local node, we can find out who's connected to us
- What's needed to run the LUTF (environment variables)
- Show the LUTF up and running:
- suites
- agents
- me
- dump yaml config
- Hello Lustre script
- Explanation of the script