Commit Graph

261 Commits

Author SHA1 Message Date
Gregory Farnum
7f8b8660d9 Merge pull request #449 from ceph/wip-fsync
tasks/cephfs: add TestClientRecovery.test_fsync

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-06-05 13:50:17 -07:00
John Spray
6d3b5c6b5e tasks/cephfs: add TestClientRecovery.test_fsync
To test that metadata written recently is
preserved across a client+server crash when
barriered with a directory fsync.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-05-29 14:33:01 +01:00
John Spray
df91f98e5b tasks/cephfs: fix typo in blacklist clearing
Broken in aa0ffb3

Signed-off-by: John Spray <john.spray@redhat.com>
2015-05-29 13:46:01 +01:00
Gregory Farnum
d9959b18ba Merge pull request #443 from ceph/wip-11301
tasks/cephfs: reset osd blacklist between tests

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-05-27 14:29:26 -07:00
Gregory Farnum
4a79c75daf Merge pull request #447 from ceph/wip-11779
tasks/cephfs: fix timing in test_full

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-05-27 14:17:27 -07:00
John Spray
5ff2743de4 tasks/cephfs: fix timing in test_full
The interval between writes was too short because
it was not taking account of the way OSDMap full
flags are set on tick rather than immediately.

Fixes: #11779

Signed-off-by: John Spray <john.spray@redhat.com>
2015-05-27 12:40:49 +01:00
Yan, Zheng
bd542353f5 tasks/cephfs: mount fusectl before listing fuse connections
Fixes: #11756
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-05-26 22:18:57 +08:00
John Spray
aa0ffb313c tasks/cephfs: reset osd blacklist between tests
...to avoid OSDMap modifications happening in the
background due to blacklist expiry.

Fixes: #11301

Signed-off-by: John Spray <john.spray@redhat.com>
2015-05-22 11:04:46 +01:00
Gregory Farnum
fed8837c98 Merge pull request #442 from ceph/wip-client-cache-size
cephfs/test_client_limits.py: invalidate kernel dcache according to client cache size

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-05-15 10:36:16 -07:00
Gregory Farnum
8eb3255a4c Merge pull request #425 from ceph/wip-flock-optional
cephfs/mount: check FUSE version before invoking flock

Reviewed-by: John Spray <john.spray@redhat.com>
2015-05-14 21:52:30 -07:00
Yan, Zheng
c7e8e544a8 cephfs/test_client_limits.py: invalidate kernel dcache according to client_cache_size
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-05-13 14:40:28 +08:00
Greg Farnum
f780f1894b cephfs/test_client_recovery: check FUSE version before invoking flock
flock only works properly on FUSE versions >=2.9, which is newer
than eg Ubuntu Precise. So check the version on our client mounts and
only test flock if it's at least that new.

Fixes: #9995

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2015-05-12 14:43:19 -07:00
John Spray
13c7f97d89 tasks/cephfs: cover pool quota in test_full
Run the same procedure as TestClusterFull, but
instead of limiting OSD memstore size, use pool
quota on the data pool.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-05-08 14:09:59 +01:00
Yan, Zheng
539117a38d tasks/cephfs: add test_pool_perm
This tests that client checks pool permission before
copy data to its cache.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-28 20:38:32 +08:00
Yan, Zheng
e850645fe4 cephfs/test_client_limits.py: test for client oldest tid warning
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2015-04-21 23:29:47 +08:00
Greg Farnum
35b6fb436c Merge remote-tracking branch 'origin/wip-3645-fixup' into greg-testing-snapshot-rename 2015-04-19 18:21:08 -07:00
John Spray
f36011051c tasks/cephfs: cope with missing ctx.daemons attr
...so that we may be used with the ceph_deploy task
that doesn't set that up.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-19 17:46:18 -07:00
John Spray
8b61310ce3 tasks/cephfs: tweak use of mon for admin commands
... s/mon_remote/admin_remote/ and allow caller to pass
in which remote they want to use for that.  Enables use
with ceph_deploy task which does not give admin keys
to mons.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-19 17:46:18 -07:00
John Spray
ea7c39222a tasks/ceph: refactor legacy FS configuration check
Move up into Filesystem so that this can be used from
the ceph_deploy task as well.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-19 17:46:18 -07:00
John Spray
7bc8875b42 tasks: implement TestStrays.test_mv_hardlink_cleanup
Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-14 14:13:40 +01:00
John Spray
a2a8c21abe tasks: update test_journal_repair
This broke with recent Client changes that
do better caching of readdir results, such
that doing an ls twice is no longer sufficient
to see a fresh result after repair - we need
to remount instead.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-14 14:13:40 +01:00
John Spray
097ccbb5be tasks: update journal_repair test for 'damaged' state
To track recent change in master where instead of
crashing on missing MDSTable object we'll go
into damaged state.

Instead of catching a crash, handle the rank's
transition to the damanged state.  Leave the crash
handling code (unused for the moment) in the
Filesystem class in case it's needed elsewhere
soon.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-14 14:13:39 +01:00
John Spray
bd3ae1eeba tasks/cephfs: add test_strays
This tests the new purge file/ops throttling
in the MDS, via the new perf counters for
strays/purging.

Fixes: #10390
Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-14 14:13:39 +01:00
John Spray
abb635588f tasks/cephfs: add test_sessionmap
Tests for the persistence behaviour of SessionMap.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-14 14:13:39 +01:00
John Spray
2b5137bf06 tasks: generalise cephfs test runner
...to avoid having boilerplate in each test module,
and gain the ability to run them all in one go
with a nice test-by-test pass/fail report.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-14 14:13:39 +01:00
John Spray
79906e3d07 tasks/cephfs: better multiple-mds handling
Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-14 14:13:39 +01:00
John Spray
ce1196d62f tasks/cephfs: be tolerant of multiple MDSs
...as long as only one is active, all the ops
that default to talking to a single MDS should
be happy to talk to the active MDS, even if there
happens to be a standby lying around too.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-04-14 14:13:38 +01:00
John Spray
1647453d66 Merge pull request #356 from ceph/wip-10948
tasks/cephfs: don't run iptables in parallel

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-03-03 20:25:09 +00:00
John Spray
5b2fd3d614 tasks/cephfs: don't run iptables in parallel
Where multiple MDSs were on the same node, trying
to concurrently update their firewall state was
causing an exception because the iptables command
errors out if another instance is already running.

Fixes: #10948
Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-02 12:41:13 +00:00
John Spray
fc4e90930b tasks/cephfs: fix/improve fuse force umount (again)
teuthology helpfully escapes things for us so
the \; didn't need the backslash.  The logic
was still falling over in some cases too.

Additionally, make the FUSE /sys/ abort operation
more surgical by working out the connection name
of our own mount during mount().

Signed-off-by: John Spray <john.spray@redhat.com>
2015-02-26 23:08:33 +00:00
Alfredo Deza
0a65e90db2 remove uneeded variable assignment for call
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2015-02-26 11:35:31 -05:00
Alfredo Deza
3a18cb29a8 remove redefined StringIO import
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2015-02-26 11:35:07 -05:00
John Spray
03b0e1064c tasks/cephfs: fix fuse force unmount
This was broken in the case of multiple
mounts, and in the case of stuck mounts.

Fixes: #10702
Signed-off-by: John Spray <john.spray@redhat.com>
2015-02-10 14:58:23 +00:00
John Spray
bf13a4e062 tasks/mds_journal_repair: create new test
This tests the new #9883 repair functionality
where we selectively scrape dentries out of
the journal while the MDS is offline.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-19 19:36:34 +00:00
John Spray
997c0c3d62 tasks/cephfs: remove config from Filesystem cons
This was only used in get_first_mon, which doesn't actually
need the parameter itself.  Makes it easier to casually
use Filesystem from any place with a ctx to hand.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-09 10:09:53 +00:00
John Spray
4ff4819573 tasks/cephfs: umount unused clients before running
When unused clients were mounted during an fs new,
they would end up in a state where they stalled
on subsequent attempts to umount them (ceph-fuse
stalls on exit if it can't terminate its mds_session)

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-09 10:09:52 +00:00
John Spray
8630c4ab3b tasks/cephfs: move ROOT_INO into filesystem module
...so that other tests can get at it.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-09 10:09:52 +00:00
John Spray
5e3f5766d0 tasks/cephfs: be more precise in set_clients_block
Instead of blocking the whole port range (which
might make OSDs running on that node collateral
damage), read the MDS's port out of the MDS map
and just block that.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-09 10:09:52 +00:00
John Spray
cfbc277c1f tasks/cephfs: move common setUp/tearDown to parent
Now that we have more of these cases, there was lots
of duplication in setup and teardown.  For some tests
the "reset everything" setup/teardown is overkill,
but it's harmless.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-09 10:09:51 +00:00
John Spray
6d79e3918b tasks/cephfs: move wait_until helpers to testcase
...so that other test cases can use them

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-09 10:08:09 +00:00
John Spray
7696afd3fa tasks: create mds_flush task
This tests:
 * The new 'flush journal' asok command
 * That the resulting on disk structures are as expected
 * That cephfs-journal-tool is happy with the result

Fixes: #9881

Signed-off-by: John Spray <john.spray@redhat.com>
2014-12-19 13:40:53 +00:00
John Spray
849e259b96 tasks: add mds_full task
This is for exercising the CephFS behaviour
when the cluster becomes full.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-12-18 12:45:31 +00:00
John Spray
f9609c4688 tasks/cephfs: let get_config use non-mon services
Previously was always using the default values of things
so querying mon instead of the appropriate service
worked fine.  However, for things we might want to
update on a per-test basis we need to go ask the
correct service what the setting really is.

Needed for osd_mon_report_interval_max in the ENOSPC
testing.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-12-18 12:45:30 +00:00
John Spray
8fa6b154e3 tasks/cephfs: enable osd epoch get from mounts
Using new hooks for #7317

Signed-off-by: John Spray <john.spray@redhat.com>
2014-12-18 12:45:30 +00:00
John Spray
dedcc6483a tasks/cephfs: enable kclient for mds_* tasks
Signed-off-by: John Spray <john.spray@redhat.com>
2014-12-18 12:45:30 +00:00
John Spray
b4214f95f4 Merge pull request #257 from ceph/wip-fs-creation
Fix PG counts and refactor FS creation during setup

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-17 11:37:09 +00:00
Yan, Zheng
09b82e2bd9 tasks: add test case for readonly MDS
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-12-10 09:48:02 +08:00
John Spray
8fc3550002 tasks/ceph: move FS creation inside Filesystem
Leave the legacy handling out in cephfs_setup, move
the filesystem creation stuff into Filesystem.  I
anticipate this being the right place for it if/when
we have tests that want to do 'fs rm' 'fs new' type
cycles within themselves.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-12-02 13:31:57 +00:00
John Spray
89beed1b0a tasks/ceph: conservative PG count in FS pools
This was tripping over the recent commit 42c85e80
in Ceph master, which tightens the limits on
acceptable PG counts per OSD, and was making
teuthology runs fail due to never going clean.

Rather than put in a new hardcoded count, infer
it from config.  Move some code around so that
the ceph task can get at a Filesystem object
to use in FS setup (this already has conf-getting
methods).

Signed-off-by: John Spray <john.spray@redhat.com>
2014-12-02 13:30:06 +00:00
Yan, Zheng
d761831133 tasks: add mds_auto_repair
New CephFS tests for MDS's auto repair functions. (So far the only
test case is verify/repair backtrace on fetch dirfrag)

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-12-02 16:26:51 +08:00
Yan, Zheng
edb780a3c5 tasks/cephfs/mount: use seperate for testing flock and posix lock
Old version libfuse treats both flock and posix lock requests as posix
lock request. This is a workaround for the bug.

Fixes: #9995
Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-11-07 09:07:27 +08:00
Yan, Zheng
88133719b7 tasks/mds_client_recovery: file lock test
check that file lock doesn't get lost after an MDS restart

Signed-off-by: Yan, Zheng <zyan@redhat.com>
2014-10-10 16:54:29 +08:00
John Spray
6ac9efef9c tasks/cephfs: say which test failed in exception
Example:
Was: 'Test failure'
Now: Test failure: test_full_caps (tasks.mds_full.TestClusterFull)

Signed-off-by: John Spray <john.spray@redhat.com>
2014-10-08 16:27:44 +01:00
John Spray
0073e25d77 tasks: rename FuseMount.get_client_id to get_global_id
'client_id' was ambiguous because in other places it
meant the '0' in client.0, whereas here it means
the runtime-generated global ID of the client.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-09-29 15:04:25 +01:00
John Spray
b77b3bec72 tasks: add mds_client_limits
New CephFS tests for the behaviour of the system while
enforcing its resource limits.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-09-29 15:04:18 +01:00
John Spray
1fa15011a3 tasks: generalise CephFSTestCase
Some of this stuff could be even more general for embedding
unittest-style suites, but for the moment let's keep the cephfs
stuff in a walled garden.

Signed-off-by: John Spray <john.spray@redhat.com>
2014-09-29 15:04:10 +01:00
John Spray
b6ccf0d414 tasks: generalize config writing for Filesystem
Signed-off-by: John Spray <john.spray@redhat.com>
2014-09-29 15:03:17 +01:00
John Spray
1d9101cf31 tasks: fix race in test_stale_caps
Signed-off-by: John Spray <john.spray@redhat.com>
2014-09-15 14:32:20 +01:00
John Spray
bb52a9733a tasks/mds_client_recovery: network freeze test
This is about testing the CephFS client's handling
of losing connectivity to the MDS.

Fixes: #7810

Signed-off-by: John Spray <john.spray@redhat.com>
2014-08-21 23:09:00 +01:00
Zack Cerza
4e1e929f75 Update module references
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-07 08:24:59 -06:00
Zack Cerza
0e1df3cc72 Import teuthology tasks (master branch)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-07 08:24:58 -06:00