Previously this test assumed no pre-existing
filesystem and no MDS running. Generalize it
to nuke any existing filesystems found before
running, so that you can use it inside a vstart
cluster that had MDS>0.
Signed-off-by: John Spray <john.spray@redhat.com>
A sample command to run the test on hadoop 2.x is
TESTDIR=/home/test HADOOP_HOME=/usr/lib/hadoop HADOOP_MR_HOME=/usr/lib/hadoop-mapreduce sh workunits/hadoop-wordcount/test.sh starting hadoop-wordcount test
Signed-off-by: rootfs <hchen@redhat.com>
`cephfs set_layout` was broken and is now deprecated
in favour of using xattrs for layout. Retire the
kclient-specific test.
Fixes: #8773
Signed-off-by: John Spray <john.spray@redhat.com>
Make sure gets and sets of tiering-specific variables succeed on tier
pools and fail on non-tier pools.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
This reverts commit 29c33f0c05.
We don't need the debugging any more, and having two separate fsx runners
already caused one update-in-the-wrong-place issue.
Signed-off-by: Greg Farnum <greg@inktank.com>
If the test is run against a cluster started with vstart.sh (which is
the case for make check), the --asok-does-not-need-root disables the use
of sudo and allows the test to run without requiring privileged user
permissions.
Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 522174b066)
mon: OSDMonitor: 'osd pool' - if we can set it, we must be able to get it
Reviewed-by: Loic Dachary <loic@dachary.org>
Reviewed-by: Sage Weil <sage@redhat.com>
Add support to get the values for the following variables:
- target_max_objects
- target_max_bytes
- cache_target_dirty_ratio
- cache_target_full_ratio
- cache_min_flush_age
- cache_min_evict_age
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Avoid possibility that we create multiple OSDs do to retries by passing in
the optional uuid arg. (A stray osd id will make the osd tell tests a
few lines down fail.)
Fixes: #8728
Signed-off-by: Sage Weil <sage@inktank.com>
... that after a fs new on fresh pools, crash_replay_interval
is set to the default on the data pool.
Signed-off-by: John Spray <john.spray@redhat.com>
If the test is run against a cluster started with vstart.sh (which is
the case for make check), the --asok-does-not-need-root disables the use
of sudo and allows the test to run without requiring privileged user
permissions.
Signed-off-by: Loic Dachary <loic@dachary.org>
Accomodate changes:
* data and metadata pools no longer exist by default
* filesystem-using tests must use `fs new` to create
the filesystem first.
Signed-off-by: John Spray <john.spray@inktank.com>
Fail if 'rbd rm' fails - most probably it'd fail with "image still has
watchers" and in that case it's a bug in the kernel client which we do
want to notice. Also nuke the trap-based error handling - cleanup() is
half-baked and not really necessary here.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Take advantage of the fact that 'rbd map' will now talk to udev and
output the device that got assigned by the kernel to the newly created
mapping. Drop the get_id() cruft, udevadm settle and chown calls.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Commit 7dc93a9651 fixed an incorrect
behavior with the OSD's 'osd bench' value hard-caps. The test wasn't
appropriately modified unfortunately.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
The test was a big sequence of commands being run and it has been growing
organically for a while, even though it has maintained a sense of
locality with regard to the portions being tested.
This patch intends to split the commands into functions, allowing for a
better semantic context and easier expansion. On the other hand, this
will also allow us to implement mechanisms to run specific portions of
the test instead of always having to run the whole thing just to test a
couple of lines down at the bottom (or have to creatively edit the test).
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
To provide coverage for the 'import' command
resulting in the same contents as before an
export/import cycle.
Signed-off-by: John Spray <john.spray@redhat.com>
As run_xfstests.sh does no longer accept test lists, wrap it to provide
an expunge file with a list of tests we want to skip for krbd runs.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Back in 2013 xfstests were rearranged, which also changed the way
./check parses test lists. Catch up with those changes. Note that
tests can no longer be listed in ranges, we only accept individual
tests and test groups (e.g. -g quick).
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
run_xfstests.sh is going to be updated in the next commit to be able to
drive newer xfstests. Among other things, the new xfstests proper
doesn't support listing tests in ranges, which is what the qemu wrapper
(run_xfstests_qemu.sh) relies on. So keep a copy of the old
run_xfstests.sh around until the qemu vm image is regenerated and the
up-to-date exclusion list for that kernel is shaken out.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reweight all items within a subtree. For example, you might reweigh tall
OSDs within a rack to a new value.
Signed-off-by: Sage Weil <sage@inktank.com>
It was a noop because it was incorrectly using the variable n. Add a
test to protect against regression.
http://tracker.ceph.com/issues/8440Fixes: #8440
Reported-by: Geoffrey Hartz <hartz.geoffrey@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
When a pool is created with ceph osd pool create, the auid is not
inferred from the session auid and is set to zero. Add the
ceph osd pool set <pool> auid <int>
command to set it after it is created, and the matching get:
ceph osd pool get <pool> auid
Signed-off-by: Loic Dachary <loic@dachary.org>
Modified qemu-iotests workunit script to check for versions
that use the latest qemu (currently only Trusty). Limit the
tests to those that are applicable to rbd.
Fixes: 7882
Signed-off-by: Warren Usui <warren.usui@inktank.com>
Listing objects isn't reliable with cache pools; skip that part of the
test if we see that rbd has tiering enabled.
Signed-off-by: Sage Weil <sage@inktank.com>
There are several perils when splitting a cache pool:
- split invalidstes pg stats, which disables the agent
- a scrub must be manually triggered post-split to rebuild stats
- the pool may fill the OSDs during that period.
- or, the pool may end up beyond the 'full' mark and once scrub does
complete and the agent activate we may block IO for a long time while
we catch up with flush/evict
Make it a bit harder for users to shoot themselves in the foot.
Fixes: #8043
Signed-off-by: Sage Weil <sage@inktank.com>
Create a custom profile with ruleset-failure-domain=osd. (The default
ruleset-failure-domain=host won't do because this script assumes and
works only if all osds are on the same host.) While at it, set k and m
explicitly to avoid troubles in the future.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
OSDs that for some reason get behind on processing their op queue break
expect_alloc_hint_eq(), as it pokes the FS and not the journal. Fix it
by flushing the journal before proceeding with anything else.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
The qa and functional tests are adapted to the new command prototype
requiring a profile instead of a list of properties. When possible the
implicit ruleset creation is used to simplify the test setup.
Signed-off-by: Loic Dachary <loic@dachary.org>
A new module, s3_utilities.pm has been created. It contains
subroutines common to at least two of the workunits in this
directory. Code was moved here from the other pl files, and
some minor changes (paramers and scope changes) were needed.
Fixes: 7472
Signed-off-by: Warren Usui <warren.usui@inktank.com>
If I have to touch this again I will remove it. Ugh. This time,
ubuntu@teuthology:/var/lib/teuthworker/archive/teuthology-2014-03-11_02:30:01-rados-firefly-distro-basic-plana/125922
hit NXIO a few lines down because one of the OSDs was still down.
Signed-off-by: Sage Weil <sage@inktank.com>
Added port (fixed value for right now in teuthology) to hostname.
Fixes: 7374
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Warren Usui <warren.usui@inktank.com>
(cherry picked from commit 8200b8a025)
- fix the wait check for osds to come back up
- make sure they get marked back in, too
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
'rados cppool' copies the contents but that doesn't make the destination
pool an unmanaged snaps pool. Therefore, we must get an ENOTSUP when
we try to remove an unmanaged snap from a not-unmanaged pool.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
This wreaks havoc on our QA because it marks osds up and down and then
immediately after that we try to scrub and some osds are still down.
Adjust the CLI test to wait for all OSDs to come back up after thrashing.
Signed-off-by: Sage Weil <sage@inktank.com>
Prevent creation of buckets of type 0 ('osd', 'device', etc.), as they
will confusing the mapping algorithm.
Signed-off-by: Sage Weil <sage@inktank.com>
The cache pools will throttle when they reach the target max size, so it
is important to make the administrator aware when they approach that point.
Unfortunately it is not particularly easy to efficiently keep track of
which PGs have hit their limit and use that for reporting. However, it
is easy to raise a flag when we start to approach the target for the
entire pool, and that sort of early warning is arguably more useful
anyway.
Trigger the warning based on the target full ratio. Not when we hit the
target, but when we are 2/3 between it and completely full.
Implements: #7442
Signed-off-by: Sage Weil <sage@inktank.com>
This is a friendlier interface for setting up a cache tier with some
reasonable defaults (defined via config options). This will simplify
the user experience and documentation.
Signed-off-by: Sage Weil <sage@inktank.com>
In general, users should not use non-empty pools as new tiers or else
things can behave strangely:
- the data sets are unrelated behavior will be... strange.
- if the cache pool is not "new" and does not do the OMAP flag, the OSD
will not know not to flush omap objects to an EC base tier
- probably other random stuff I'm forgetting
Allow a user to shoot themselves in the foot with --force-nonempty.
Implements: #7457
Signed-off-by: Sage Weil <sage@inktank.com>
We would like to get the hit set parameters: hit_set_type |
hit_set_period | hit_set_count | hit_set_fpp via OSDMonitor
Signed-off-by: Kai Zhang <zakir.exe@gmail.com>
comment out erasure pool related tests when an OSD is involved because
it does not work yet. See http://tracker.ceph.com/issues/7360.
Signed-off-by: Loic Dachary <loic@dachary.org>
Now ObjectStore support three backend types, so we need to make each backend
share unit test to avoid duplicate codes.
This patch mainly make workload_generator workable for objectstore.
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
On Linux ENOTSUP is remapped
/usr/include/x86_64-linux-gnu/bits/errno.h
/* Linux has no ENOTSUP error code. */
# define ENOTSUP EOPNOTSUPP
and should have different values on other operating systems. On Ubuntu
precise the string returned when translating the error value of ENOTSUP
or EOPNOTSUPP is always EOPNOTSUPP but on Ubuntu saucy it is always
ENOTSUP.
Replace ENOSYS with ENOTSUP because the expected semantic is very
similar and modify the test to not check on the string translation of
the error.
Rework the check_response shell function to optionaly check the return
code. The erasure coded pool size change test verifies the error message
only but not the error code.
Signed-off-by: Loic Dachary <loic@dachary.org>
We had already added this as a flag (set/unset) when I generalized the
'mds set_max_mds' to be 'ceph mds set <var> <val>'. Switch the snaps
flag to be a key/value to with true/false (similar to the hashpspool
pool flag) since there are fewer users and the var/val approach is more
general.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
When run in a shared environment ( as opposed as a machine created for
the purpose of running this test only ), it is important to cleanup
leftovers to avoid poluting the /tmp space. Create a common temporary
directory for all tmp files.
Signed-off-by: Loic Dachary <loic@dachary.org>
First, add the ability to modify max_file_size. While we are at it, move
to a more sensible interface for adjusting max_mds too.
Signed-off-by: Sage Weil <sage@inktank.com>
This will show up on the command line and logs, making it more
clear than EINVAL.
Fixes#6851 and #4045
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
The three rules created by build_simple are identical. They are replaced
by a single rule named replicated_rule which is set to be used by the
data, rbd and metadata pools.
Instead of hardcoding the ruleset number to zero, it is read from
osd_pool_default_crush_ruleset which defaults to zero.
The CEPH_DEFAULT_CRUSH_REPLICATED_RULESET enum is moved from osd_type.h to
config.h because it may be needed when osd_type.h is not included.
Signed-off-by: Loic Dachary <loic@dachary.org>
Creating an erasure pool will crash the OSD because OSD::_make_pg
asserts if the type is not replicated. The tests related to erasure
coded pool creation are removed from qa/workunits/cephtool/test.sh.
The osd-create-pool.sh unit test covers the cases removed from test.sh
more extensively. The intent is to check the interactions with the MON
only, therefore it does not run an OSD and the absence of erasure code
placement group backend implementation is not an issue.
Signed-off-by: Loic Dachary <loic@dachary.org>
When osd create pool is called twice on the same pool, it will succeed
because the pool already exists. However, if a different type is
specified, it must fail.
Signed-off-by: Loic Dachary <loic@dachary.org>
It looked like it worked because the wrapper hide the error. The failing
tests are commented out so that the other tests can be used.
Signed-off-by: Loic Dachary <loic@dachary.org>
Display benchmark results for the default erasure code plugins, in a tab
separated CSV file. The first two column contain the amount of KB
that were coded or decoded, for a given combination of parameters
displayed in the following fields.
seconds KB plugin k m work. iter. size eras.
1.2 10 example 2 1 encode 10 1024 0
0.5 10 example 2 1 decode 10 1024 1
It can be used as input for a human readable report. It is also intented
to be used to show if a given version of an erasure code plugin performs
better than another.
The last column ( not shown above for brievety ) is the exact command
that was run to produce the result so it can be copy / pasted to
reproduce them or to profile.
Only the jerasure techniques mentionned in
https://www.usenix.org/legacy/events/fast09/tech/full_papers/plank/plank_html/
are benchmarked, the others are assumed to be less interesting.
Signed-off-by: Loic Dachary <loic@dachary.org>
crush: make set_chooseleaf_tries work with firstn chooseleaf, too
Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.com>
instead of assuming the pool size is 2, query it and increment it to
test for pool set data size. It allows to run the test from vstart.sh
without knowing what the required pool size is in advance:
rm -fr dev out ; mkdir -p dev ; \
MON=1 OSD=3 ./vstart.sh -n -X -l mon osd
LC_ALL=C PATH=:$PATH CEPH_CONF=ceph.conf \
../qa/workunits/cephtool/test.sh
Signed-off-by: Loic Dachary <loic@dachary.org>
The file removal installed to be triggered when the script stops must
not fail if the file does not exist.
Signed-off-by: Loic Dachary <loic@dachary.org>
We ran into problems before when we made this a string because a mixed
cluster of mons might forward a client request with the wrong schema.
To make this work, we make the new code understand both the new and
old schema, and also backport a change to emperor and dumpling to
handle the new schema.
For the previous attempt to do this, see:
337195f0462fe0d0d97a
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
feed osd info about os, kernel, memory, arch to the mons
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>