All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loic Dachary <loic@dachary.org>
To: John Spray <john.spray@redhat.com>, ceph-devel@vger.kernel.org
Subject: Re: vstart runner for cephfs tests
Date: Thu, 23 Jul 2015 13:23:12 +0200	[thread overview]
Message-ID: <55B0CEA0.80008@dachary.org> (raw)
In-Reply-To: <55B0BB59.7010806@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3499 bytes --]

Hi John,

You may be interested by 

https://github.com/ceph/ceph/blob/master/src/test/ceph-disk-root.sh

which is conditionally included 

https://github.com/ceph/ceph/blob/master/src/test/Makefile.am#L86

by --enable-root-make-check

https://github.com/ceph/ceph/blob/master/configure.ac#L414

If you're reckless and trust the tests not to break (a crazy proposition by definition IMHO ;-), you can

make TESTS=test/ceph-disk-root.sh check

If you want protection, you do the same in a docker container with

test/docker-test.sh --os-type centos --os-version 7 --dev make TESTS=test/ceph-disk-root.sh check

I tried various strategies to make tests requiring root access more accessible and less scary and that's the best compromise I found. test/docker-test.sh is what the make check bot uses.

When a test can be used both from sources and from teuthology, I found it more convenient to have it in the qa/workunits directory which is available in both environments. Who knows, maybe you will want a vstart based cephfs test to run as part of make check, in the same way 

https://github.com/ceph/ceph/blob/master/src/test/cephtool-test-mds.sh

does.

Cheers

On 23/07/2015 12:00, John Spray wrote:
> 
> Audience: anyone working on cephfs, general testing interest.
> 
> The tests in ceph-qa-suite/tasks/cephfs are growing in number, but kind of inconvenient to run because they require teuthology (and therefore require built packages, locked nodes, etc).  Most of them don't actually require anything beyond what you already have in a vstart cluster, so I've adapted them to optionally run that way.
> 
> The idea is that we can iterate a lot faster when writing new tests (one less excuse not to write them) and get better use out of the tests when debugging things and testing fixes.  teuthology is fine for mass-running the nightlies etc, but it's overkill for testing individual bits of MDS/client functionality.
> 
> The code is currently on the wip-vstart-runner ceph-qa-suite branch, and the two magic commands are:
> 
> 1. Start a vstart cluster with a couple of MDSs, as your normal user:
> $ make -j4 rados ceph-fuse ceph-mds ceph-mon ceph-osd cephfs-data-scan cephfs-journal-tool cephfs-table-tool && ./stop.sh ; rm -rf out dev ; MDS=2 OSD=3 MON=1 ./vstart.sh -d -n
> 
> 2. Invoke the test runner, as root (replace paths, test name as appropriate.  Leave of test name to run everything):
> # PYTHONPATH=/home/jspray/git/teuthology/:/home/jspray/git/ceph-qa-suite/ python /home/jspray/git/ceph-qa-suite/tasks/cephfs/vstart_runner.py tasks.cephfs.test_strays.TestStrays.test_migration_on_shutdown
> 
> test_migration_on_shutdown (tasks.cephfs.test_strays.TestStrays) ... ok
> 
> ----------------------------------------------------------------------
> Ran 1 test in 121.982s
> 
> OK
> 
> 
> ^^^ see!  two minutes, and no waiting for gitbuilders!
> 
> The main caveat here is that it needs to run as root in order to mount/unmount things, which is a little scary.  My plan is to split it out into a little root service for doing mount operations, and then let the main test part run as a normal user and call out to the mounter service when needed.
> 
> Cheers,
> John
> -- 
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Loïc Dachary, Artisan Logiciel Libre


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2015-07-23 11:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23 10:00 vstart runner for cephfs tests John Spray
2015-07-23 11:23 ` Loic Dachary [this message]
2015-07-23 12:34   ` John Spray
2015-07-23 12:37     ` Loic Dachary
2015-07-23 11:56 ` Mark Nelson
2015-07-23 12:37   ` John Spray
2015-07-23 12:51     ` Mark Nelson
2015-07-23 13:38       ` Podoski, Igor
2015-07-23 17:15 ` Gregory Meno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55B0CEA0.80008@dachary.org \
    --to=loic@dachary.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=john.spray@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.