When a test fails, the script returns immediately and kill_daemon
function is called to cleanup. It is quite verbose and requires
scrolling hundreds of lines back to find the actual error
message. Turn off the shell trace to reduce the verbosity and improve
error output readability.
The kill_daemon cannot just turn off set -x because it may be called by
a test, not just at the end of the run. Instead the kill_daemon function
checks if tracing is activated and temporarily disables it.
Also get rid of the find standard error that commonly happens when
kill_daemon is called to verify there are no leftovers and the test
directory does not exist.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
The async readahead finisher needs to reference 'struct Fh'. But
it's possible user closes FD and free the corresponding 'struct Fh'
before async readahead finishes.
Fixes: #12088
Signed-off-by: Yan, Zheng <zyan@redhat.com>
For get_duration(), it should return the duration of Op. For ops which in
flight, the duration is the time current time subtrace the
initiated_time. For the completed Ops, it used the last event(done)
subtrace the initiated_time.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
These should all have already been safe as rejoin/resolve
path only happens once, but lets assert as well so that
any logic bugs don't turn into segfaults.
Signed-off-by: John Spray <john.spray@redhat.com>
Previously, update_metadata() read last_metadata from the store, added
a new metadata to the transaction, and triggered propose, so metadata
eventually was updated in the store. But if during this time window
another update_metadata() happened, it read old metadata (without the
new mds from the first update), and when it was committed the new mds
from the first update was lost.
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
Fixes: #12079
Broken multipart objects: multipart objects that created on 0.94.2
and that start with underscore have a bad locator on their tail objects.
This extends the tool that was needed for older issue we've had with
hammer multipart objects (that start with underscore). The same usage
applies:
$ radosgw-admin bucket check --check-head-obj-locator \
--bucket=<bucket> [--fix]
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
* this change fixes the warning from clang:
ErasureCodeJerasure::parse' hides overloaded virtual function
[-Woverloaded-virtual]
* some erasure codecs' ErasureCode::parse() rewrites the profile
using the default values when parsing it if the corresponding
items are not specified. and we don't call ErasureCode::parse()
via its children's references. so no need to make it a virtual
function.
* and ErasureCode::parse() is used as a helper function by its
children, so make it `protected`
* and parse() in ErasureCode's children is but a helper function
called by ctor, descendants' parse() and init(). so make them
protected or private accordingly.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Under certain conditions (like bench seq/rand -b 1024 -t 128) it is
possible that aio_read reads data into destination buffers before or
during memcmp execution, resulting in "[..] is not correct!" errors
even if actual objects are perfectly fine.
Also, moved latencty calculation around, so it is no longer affeted
by memcmp.
Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
The ImageWatcher is not initialized when in R/O mode, which
resulted in a NULL pointer dereference.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
when some rules have been deleted before, the index in array of crush->rules
is not always equals to crush_ruleset of pool.
Fixes: #12210
Reported-by: Ning Yao <zay11022@gmail.com>
Signed-off-by: Xinze Chi <xmdxcxz@gmail.com>