Project

General

Profile

Actions

Feature #4692

closed

rbd qa: create an rbd lib shell script

Added by Alex Elder about 11 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

I have been repeating big blogs of script code and I'd
like to create a library file that can be incorporated
into them so I can avoid that. I've been talking with
Sam Lang about how to go about doing that and now I'm
thinking it may be non-trivial, so I'm creating a separate
issue to track getting that done.

For the time being, I guess I'll duplicate code...

Actions #1

Updated by Alex Elder about 11 years ago

Based on our discussion...

A user's ~/.teuthology.yaml specifies the root of the
test directory by defining the value of "test_path", e.g.:

test_path: /tmp/cephtest/elder

By default, it's just /tmp/cephtest/<user>-<tstamp> or
/tmp/cephtest/<jobname>. Call this the "test root."

Within that, subdirectories are created for the role that's
executing the test (e.g., client.0, mon.b, mds.a, osd.3, etc.).
So, for example:

/tmp/cephtest/elder-<something>/workunit.client.0/

Call this the "role test path."

The scripts get copied from the git repository into
the role test path for execution. The things in that
directory are the same as are in the "qa/workunits"
directory of the ceph repository. I.e.

 ls workunit.client.0/
caps       false.sh               kernel_untar_build.sh  misc   rbd      suites
cephtool   hadoop-internal-tests  libcephfs              mon    rename
cls        hadoop-wordcount       libcephfs-java         osdc   restart
direct_io  kclient                Makefile               rados  snaps
ubuntu@mira096:/tmp/cephtest$ 

A mount point is created in the test root, and a file
system is mounted onto it, and that's where the tests
are actually run. Call that the "test mount point."
That is, something a bit like:

mkdir <test_root>/mnt.$$
mount /dev/<whatever> <test_root>/mnt.$$
cd <test_root>/mnt.$$
<role_test_path>/script.sh

Apparently the test script will be launched using its
absolute path, so it should be possible to derive that
and the test using something like:

ROLE_TEST_PATH=$(dirname $0)
TEST_MOUNT_POINT=$(pwd)

It should therefore be possible to include an rbd script
library using the above and something like:

source "${ROLE_TEST_PATH}/rbd/rbd_common.sh" 

And make sure that's not checked in as an
executable script (so it won't be considered
runnable by the workunit task). Or maybe
move it elsewhere under qa/workunits that will
not be treated that way (if that's possible).

OK, I think that's about all the background
we should need.

Actions #2

Updated by Jason Dillaman over 7 years ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF