Commit Graph

154 Commits

Author SHA1 Message Date
Yan, Zheng
9b0e2a3ace tasks/cephfs: test for race between cap flush and clientreplay
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2016-01-15 13:49:19 +08:00
Yan, Zheng
b2a304e651 tasks/cephfs: fix race in test_damage
When stray directory inodes are corrupted, MDS may go to damaged state
after becoming active. (MDCache::open_root/populate_mydir is called by
MDSRank::starting_done).

Fixes: #14196
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2016-01-04 20:42:35 +08:00
Gregory Farnum
da8a891b74 Merge pull request #744 from ceph/wip-inode-claim
tasks/cephfs: add TestJournalRepair.test_table_tool_take_inos

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-12-06 21:10:10 -08:00
Gregory Farnum
5e714c69d5 Merge pull request #703 from ceph/wip-layout-restrict
tasks/cephfs: test for auth caps pool-setting restriction

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-12-06 21:05:55 -08:00
John Spray
1280caf7c2 tasks/cephfs: avoid using bare remote.run in scrub_checks
Use the Mount.* wrappers for filesystem operations,
so that changes like making run_shell use sudo just work.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-12-02 23:30:55 +00:00
John Spray
0cd6cb10ac tasks/cephfs: update for run_shell vs. sudo
(TestStrays.test_snapshot_remove blocked on the sudo change)

Signed-off-by: John Spray <john.spray@redhat.com>
2015-12-02 23:30:55 +00:00
John Spray
80397a5db2 tasks/cephfs: always sudo in run_shell
This was causing permissions issues when
running inside teuthology, as run_python
was using sudo and run_shell wasn't.

Would be nice to get rid of all the rootishness,
but for the moment just make it more uniform.
2015-12-02 23:30:55 +00:00
John Spray
bb924d2095 tasks/cephfs: cover snaps in test_strays
Signed-off-by: John Spray <john.spray@redhat.com>
2015-12-02 23:30:55 +00:00
John Spray
14e2cf1ef2 tasks/cephfs: add TestForwardScrub
This tests the forward scrub's ability to traverse
some metadata and tag it, and the corresponding
functionality in cephfs-data-scan to filter based
on tag and inject orphaned items.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-12-02 23:28:28 +00:00
John Spray
b3da9d7e7c tasks/cephfs: add TestJournalRepair.test_table_tool_take_inos
Signed-off-by: John Spray <john.spray@redhat.com>
2015-11-27 17:43:28 +00:00
Gregory Farnum
bb5aaac923 Merge pull request #729 from ceph/wip-scrub-tidy
tasks/cephfs: tidy test_scrub_checks

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-11-25 17:13:52 -05:00
Gregory Farnum
3ba38a4c29 Merge pull request #674 from ceph/wip-13698
tasks/cephfs: fix race in test_sessionmap

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-11-25 17:12:36 -05:00
Gregory Farnum
e774886a3c Merge pull request #663 from ceph/wip-client-mark-down
tasks/cephfs: quick test for `tell`...

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-11-25 17:08:58 -05:00
Gregory Farnum
079ba9ef52 Merge pull request #647 from ceph/wip-repair-dir
tasks/cephfs: include an empty dir in journal repair

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-11-25 17:04:59 -05:00
Gregory Farnum
d5934fc96d Merge pull request #633 from ceph/wip-test-failover
tasks/cephfs/test_failover

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-11-25 17:00:29 -05:00
John Spray
69560a8d65 tasks/cephfs: tidy test_scrub_checks
Use named error codes instead of numbers, and
use the helper fn for getting inode number
instead of doing it by hand.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-11-23 17:47:02 +00:00
John Spray
95538f2c06 tasks/cephfs: test for auth caps pool-setting restriction
Signed-off-by: John Spray <john.spray@redhat.com>
2015-11-13 14:16:38 +00:00
John Spray
c713423bd1 tasks/cephfs: fix race in test_sessionmap
Fixes: #13698
Signed-off-by: John Spray <john.spray@redhat.com>
2015-11-05 01:15:57 +00:00
John Spray
54e53a0006 tasks/cephfs: simplify test_backtrace_repair
This was previously using a bunch of files and a small
MDCache limit to force things out of cache.  It is much
simpler to just drop the journal.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-11-03 11:56:06 +00:00
Greg Farnum
2e47e03745 filesystem: fix get_daemon_names
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2015-10-29 15:35:43 -07:00
John Spray
b51a929c6f tasks/cephfs: quick test for tell...
...specifically that we don't have lingering
MDS sessions after running it.  This is testing
that Client::shutdown is doing the right thing
and closing sessions.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-28 14:28:42 +09:00
John Spray
4a83c56604 tasks/cephfs: include an empty dir in journal repair
Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-19 17:57:53 +01:00
John Spray
176e9ef267 tasks/cephfs: add test_failover
A quick check that clients refuse to mount
when daemons are laggy, and while we're at it,
that the basics of failover work.  It's a trivial
test, but it's nice to have this kind of thing
so that we don't have to wait for weird thrasher
failures if something breaks.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-14 02:20:00 +01:00
John Spray
043049f6c3 tasks/cephfs: add a wait_for_daemons
...to avoid trying to mount a client
before the daemons are ready

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-14 02:16:13 +01:00
Yan, Zheng
b03ac07980 tasks/cephfs: fix TestClientLimits.test_client_oldest_tid
To get the health warning, first we need to make sure requests are
added to session's completed request list. Then we need to send an
extra request to MDS to trigger the code that generates the warning.

Fixes: #13437
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-10-13 16:53:39 +08:00
John Spray
62247f2009 tasks/cephfs: fix FuseMount bin path in vstart
FuseMount only uses the prefix for finding the 'ceph'
executable, which is in ./ for either cmake or
authtools, not ./src for cmake like other binaries.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:18 +01:00
John Spray
0584b9c8dc tasks/cephfs: fix test_journal_migration
It was trying to get the output file from
a different remote than the one used to
run the journal tool.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:18 +01:00
John Spray
9eb65dd1be tasks/cephfs: move mds_scrub_checks
...into a CephFSTestCase.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:18 +01:00
John Spray
03ea0971cc tasks/cephfs: move journal migration test
...into a CephFSTestCase.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:17 +01:00
John Spray
176123caea tasks/cephfs: extend vstart_runner's ctx&run
Sufficiently to enable using workunits.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:17 +01:00
John Spray
99e3a400e1 tasks/cephfs: add --interactive for vstart runner
Just like interactive-on-error in teuthology.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:17 +01:00
John Spray
904fd76813 tasks/cephfs: fix FuseMount._asok_path
Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:17 +01:00
John Spray
20e7d2af24 tasks/cephfs: remove a redundant sudo
Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:17 +01:00
John Spray
4f8adf155b tasks/cephfs: raise error on non-string stdins
Shouldn't be any from the fs tests that get run

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:17 +01:00
John Spray
80a9efb73d tasks/cephfs: warn if vstart_runner can't import mods
Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:17 +01:00
John Spray
06891416da tasks/cephfs: stop if needed binaries are absent
Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:17 +01:00
John Spray
23ae9815a5 tasks/cephfs: add instructions to vstart_runner
Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:17 +01:00
John Spray
cbb85720f3 tasks/cephfs: updates for cmake environ
Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:17 +01:00
John Spray
8b846b9f2c tasks/cephfs: add vstart runner script
This is to allow running CephFSTestCase tests
against a vstart cluster, for much faster turnaround
during development than running teuthology against
built ceph packages.

Not everything will be runnable this way, but for
certain things like filesystem repair scenarios we
have everything we need within a vstart environment.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:17 +01:00
John Spray
efb62ae1e7 tasks/cephfs: mark some tests as @needs_trimming
So that we can drop these tests when not running
client as root.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:17 +01:00
John Spray
f8a4b08702 tasks/cephfs: add needs_trimming decorator
For tests to advertise that they need the client
to be able to trim its cache (i.e. currently that
means requiring run as root)

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:17 +01:00
John Spray
c0e90aa5a7 tasks/cephfs: make FuseMount.teardown safer
(don't assume fuse_daemon exists)

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:16 +01:00
John Spray
1ed6272d93 tasks/cephfs: mark some tests as @long_running
Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:16 +01:00
John Spray
d4ecee82e4 tasks/cephfs: add @long_running decorator
A means for test cases to mark particular methods
as long running, so that the vstart runner can skip
them when running for developers.

This is not a scientific thing, anything that takes
more than about 2 minutes due to lots of iteration
or sleeps.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:16 +01:00
John Spray
9a1ca94edc tasks/cephfs: cluster_down before fs rm
In teuthology this isn't needed because we join the
mds child processes after killing them.  In vstart
we're killing them asynchronously, so be a bit more
careful to ensure they can't re-insert themselves
to the mdsmap between our calling fail and our calling
fs rm.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:16 +01:00
John Spray
684e0deb6f tasks/cephfs: split up TestClientRecovery
...into the part that requires a network-isolated
client and the part that doesn't.

This happens to also be the part that won't work with
vstart vs. the part that will.  teuthology yaml will
still pick up and run both parts.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:16 +01:00
John Spray
6f8a35bb42 tasks/cephfs: make memstore dependency declarative
...instead of checking for it procedurally during
TestClusterFull.setUp

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:16 +01:00
John Spray
98da1e0d84 tasks/cephfs: refine TestClientLimits.test_client_oldest_tid
* Instead of creating files in background, create
  them in foreground (simpler).
* Instead of creating max_request*2 files, just create
  max_requests plus a litle bit.
* Set max_requests to 1000 instead of 5000 to run a bit
  faster.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:16 +01:00
John Spray
37d55663f0 tasks/cephfs: fix race in TestStrays
We weren't waiting for export dir to complete (the asok
just starts the process).  This wasn't noticeable when running
remotely due to latency between the test runner and the MDS,
but it shows up when running against a local vstart cluster.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:16 +01:00
John Spray
be749f8fde tasks/cephfs: work around fuse weirdness
I am seeing a strange thing where it seems like sometimes
a ls of /sys/fs/fuse/connections is returning empty when
connections do exist.  It is pretty easy to make this
a non-issue by waiting for "more conns than we started with"
instead of "list of conns is different", so do that.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-10-02 17:41:16 +01:00