A get/set command may fail with
Error EBUSY: currently creating pgs, wait
if issued before the PGs are clean. Call wait_for_clean after the pool
is created or a pool setting is changed and remaps the PGs it
contains (size, pg_num...) to ensure the PGs are clean and the set/get
command that follow will succeed.
http://tracker.ceph.com/issues/11624Fixes: #11624
Signed-off-by: Loic Dachary <ldachary@redhat.com>
The semantic and interface of get_pg are the same, that avoids
duplication and the ceph-helpers.sh version is tested and documented.
Make the ceph-test package dependent on xmlstarlet because it is
needed by ceph-helpers.sh.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
...not very elegantly because this is bash, but
at least check the expected value is somewhere
present in the JSON output.
Signed-off-by: John Spray <john.spray@redhat.com>
When CEPH_CLI_TEST_DUP_COMMAND=1 is set, ceph osd create will consume
two osd id and return the later. Fix the test to account for that and
not assume the osd id being allocated by osd create is always the
next available osd id.
The other osd create tests do not suffer from the same variation because
they provide a UUID argument that guarantees the same osd id is going to
be returned every time.
http://tracker.ceph.com/issues/11618Fixes: #11618
Signed-off-by: Loic Dachary <ldachary@redhdat.com>
Move check-local scripts
src/test/run-cli-tests
encode-decode-non-regression.sh
test/encoding/readable.sh
to check_SCRIPTS. Their output is captured in .log file when running
with a recent automake. This reduces the output of make check by an
order of magnitude.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
If we add a pool with snap state as a tier the snap state gets clobbered
by OSDMap::Incremental::propogate_snaps_to_tiers(), and may prevent OSDs
from starting. Disallow this.
Include a test.
Fixes: #11493
Backport: hammer, giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
Instead of
* setting limit
* populate the cache
* check the health warnings
do the following
* populate the cache
* set limits below the content of the cache
* check the health warnings
The problem with the former approach is that the limits stored by the
OSD internally do not exactly match the one set by the user: they are
converted in ratios and there may be rounding errors.
Also replace the busy loop waiting for pg stats to flush with
ceph tell osd.* flush_pg_stats || true
for simplicity.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
On a machine slow enough, the tiering agent can be activated while
testing border cases where the cache is almost full. Prevent that
by deactivating the tiering agent.
http://tracker.ceph.com/issues/11359Fixes: #11359
Signed-off-by: Loic Dachary <ldachary@redhat.com>
ISA and Jerasure can be compared for the default stripe width (4KB) and
the two most commonly used Reed Solomon matrices. Comparing the
bandwidth for large chunks (1MB) is not relevant because it is not
commonly used.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
* also translate "repair" if specified as "states"
* update test_mon_pg in cephtool-test-mon.sh
Fixes: #11569
Signed-off-by: Kefu Chai <kchai@redhat.com>
Obtain the local IP of the client and save the nonce provided when the messenger was created. This is required for RBD lock/unlock
Fix script error in RBD concurrent test
Reset did_bind during messenger shutdown
Signed-off-by: Raju Kurunkad <raju.kurunkad@sandisk.com>
* if ceph is not reading from a tty, expect EOF instead of "quit"
as the end of input.
* do not panic at seeing the EOF
* update the test case test_mon_injectargs_SI(). since we disables
"ceph injectargs <args,...>" in a458bd83, in which the arguments
of "injectargs" are supposed to be consumed by "tell" instead.
so "ceph injectargs ..." is taken as an incomplete command, and
this command will bring ceph cli into the interactive mode,
redirecting its stdin to /dev/null helps ceph cli quit the loop,
but in a way of throwing EOFError exception. this change handles
the EOF, so the "ceph injectargs ..." does not throws anymore.
but the side effect is that the test fails since it expects a
non-zero return code. so replace it with an equivalent "tell"
command which also fails but due to the non-SI postfix.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Don't forget set cachemode.
By the way, For test max_target_bytes, don't reply on /etc/passwd
because different host have different size of /etc/passwd.
Avoid met this bug, i create a tmp file.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
This will only output all the values applicable to a given type of pool.
So for example for a pool that is not a tier pool values like HIT_SET_TYPE,
HIT_SET_PERIOD, HIT_SET_COUNT etc. will be ignored.
Fixes: #10891
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
lttng requires daemons (things that call fork, clone, or daemon
without exec, like fuse) to use a LD_PRELOAD library. Without this,
the lttng atexit() handler crashes.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
! doesn't do what we want in bash -e. Use a more explicit helper
instead, and specify expected error codes.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
The crushtool is aborted if it takes more than mon lease seconds. Since
the monitor blocks while running it, this is mandatory otherwise the
monitor will be considered down and new elections triggered.
http://tracker.ceph.com/issues/10947Fixes: #10947
Signed-off-by: Loic Dachary <ldachary@redhat.com>
If the exclusive lock feature is enabled, all locks need
to be removed prior removing the image.
Fixes: #10990
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Handle the case that kernel does not support fcntl.F_OFD_SETLK.
Also fix the code that checks if fnctl fails with errno == EINTR.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
The rbd CLI now utilizes the rbd_default_format configuration
setting, therefore the copy test now needs to tell rbd which image
format it is expecting to create.
Fixes: #10961
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Instead of the http://github.com/dachary namespace. It is not an issue
in the common case because it should be cloned because it is in the
.gitmodules file with the proper namespace.
http://tracker.ceph.com/issues/10836Fixes: #10836
Signed-off-by: Loic Dachary <ldachary@redhat.com>
We're seeing the lsof invocation fail (as not found) in testing and nobody can
identify why. Since attempting to reproduce the issue has not worked, this
patch will gather data from a genuinely in-vitro location.
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
The test was removed in 1189138 (mon: make ceph tell mon.* version
work) as it began to fail due to #10439. After it fixed in c4548f6
(pybind: ceph_argparse: validate incorrectly formed targets), the test
can be restored.
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
* Use set -e to detect errors
* no need to retry cleanup in a loop now that rbd-fuse closes images
* use --no-progress for long-running operations
* add output at the start of each test
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Until the kernel supports RBD exclusive locking, this test
has been updated to create shared images (exclusive locking
disabled).
Fixes: #10613
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
This is because running fs/misc on a kclient
should not include quota (quota not supported
on kernel client).
Fixes: #10579
Signed-off-by: John Spray <john.spray@redhat.com>
Automatic locking hides the ESHUTDOWN from the caller, which is how
this test detects that blacklisting works.
Fixes: #10592
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
* nodelete - pool can't be deleted
* nopgchange - pool's pg and pgp num can't be changed
* nosizechange - pool's size and min size can't be changed
This is intended to help some poor admin to avoid a very bad day.
Fixes: #9792 (but in a different way than it was proposed there)
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
undersized not valid: undersized not in inactive|unclean|stale
undersized not valid: undersized doesn't represent an int
Invalid command: unused arguments: ['undersized']
pg dump_stuck {inactive|unclean|stale [inactive|unclean|stale...]} {<int>} : show information about stuck pgs
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
These can happen with split or with state changes due to reordering
results within the hash range requested. It's easy enough to filter
them out at this stage.
Backport: giant, firefly
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Because fs reset opens a brief window for the previously
failed MDSs to spring back into life.
Fixes: #10539
Signed-off-by: John Spray <john.spray@redhat.com>
Previously was set in hashbang, which meant
that "./quota.sh" was OK, but "sh ./quota.sh" would
just run through ignoring errors.
Signed-off-by: John Spray <john.spray@redhat.com>
The tiobench software has been abandoned upstream for years. Fedora and
Debian are no longer shipping the tiobench package, so we've had to
carry the package ourselves in the Ceph project, and we're trying to
slim down our dependencies where it makes sense to do so.
Nuke the tiobench suite.
http://tracker.ceph.com/issues/10152 Refs: #10152
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
This is like a temporary measure as the mon will try to set them again,
but we have run into cases where the mon was misbehaving (failing to clear
the flag) and we wanted to do it. Note that the mon will likely set it
again on the next tick() anyway.
If we're going to clear it, we may as well be able to set it, too (again,
even if the mon is going to clear it soon). If nothing else this is useful
for writing tests.
Fixes: #9323
Signed-off-by: Sage Weil <sage@redhat.com>