We include TrimRequest.cc in librbd tests at two places:
- operation/test_mock_TrimRequest.cc
- operation/test_mock_ResizeRequest.cc
That causes linking errors when doing the builds because some of the
instantiated classes are defined twice.
We can fix this by not instantiating the template class in the
TrimReqeust.cc file when including it in the tests.
Signed-off-by: Boris Ranto <branto@redhat.com>
the multisite tests run manual trim operations with radosgw-admin, which
can race with internal log trimming to produce tests failures
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Make the only caller of removed() not need to call note_modified_object
separately, dropping the unneeded erase() call.
Signed-off-by: Sage Weil <sage@redhat.com>
We need to make sure we carry this ref through until the object is
deleted or else another request right try to read it before the kv
txn is applied. (This is easy to trigger now that onreadable is completed
at queue time instead of commit time.)
Signed-off-by: Sage Weil <sage@redhat.com>
The one exception to the "immediately readable" it collection_list, which
is not readable until the kv transaction is applied. Our choices are
1. Wait until kv to apply to trigger onreadable (for any create/remove
ops). This wipes away much of the benefit of fully sync onreadable.
2. Add tracking for created/removed objects in BlueStore so that we can
incorporate those into collection_list. This is complex.
3. flush() from collection_list. Unfortunately we don't have osr linked
to Collection, so this doesn't quite work with the current ObjectStore
interface.
4. Require the caller flush() before list and put a big * next to the
"immediately onreadable" claim. It turns out that because of FileStore,
the OSD already does flush() before collection_list anyway, so this does
not require any actual change... except to store_test tests. (This didn't
affect filestore because store_test is using apply_transaction, which
waits for readable, and on filestore that also implies visible by
collection_list.)
Signed-off-by: Sage Weil <sage@redhat.com>
This doesn't work as implemented. We are doing _txc_finalize_kv() from
queue_transactions, which calls into the freelist and does this verify
code. However, we have no assurance that a previous txc in the sequencer
has applied its changes to the kv store, which means that a simple sequence
like
- write object
- delete object
can trigger if the write is waiting for aio. This currently happens
with ObjectStore/StoreTest.SimpleRemount/2.
Comment out the verify, but leave _verify_range() helper in place in case
we can use it in the future in some other context.
Signed-off-by: Sage Weil <sage@redhat.com>
The parent may go away, so we need to keep our own copy of shard_hint in
OpSequencer to avoid a user-after-free (e.g., when the user drops their
osr and calls OpSequencer::discard()).
Signed-off-by: Sage Weil <sage@redhat.com>
If bluestore chooses to it may try to call sync_finish() from the queueing
call chain (instead of finish() from a Finisher). Allow it for several
Contexts in PG and PrimaryLogPG, including those used for the main IO
path.
We assume here that all Contexts that we bless can complete synchronously
by calling their normal finish() method.
Signed-off-by: Sage Weil <sage@redhat.com>
Bluestore updates are immediately present in the cache and readable. The
only exception are omap updates, but the read methods there block until
they commit, so we can still tell the OSD that they are readable.
Signed-off-by: Sage Weil <sage@redhat.com>
We would get this implicitly with FileStore if we waited for the onreadable
callbacks, but in some cases the OSD has already done that. With BlueStore,
we need to explicitly flush().
Signed-off-by: Sage Weil <sage@redhat.com>
Sometimes we are able to complete a context synchronously, within the same
callchain of the caller who queued it. In this case the locking rules are
usually a bit different for the caller. Add a generic Context hook that
allows this.
If a sync-capable Context implements sync_complete, it can do whatever
it needs to do for this particular event. If it is not implemented, the
generic implementation will return false, and the caller can use the
normal complete() as it normally would have (presumably by calling it
asynchronously, e.g., in a Finisher).
If sync_complete() is implemented, it *must* return true.
Signed-off-by: Sage Weil <sage@redhat.com>
The second _rval list was a dumb idea. A vector of pairs is simpler
and more efficient.
Also, extend support to any container type.
Signed-off-by: Sage Weil <sage@redhat.com>
The `on_call` context serves as a barrier and should be completed
after the `on_start_ctx` context is assigned.
The warning was observed sporadically e.g. by repeating
WaitingOnNonLeaderAcquireLeader test under valgrind.
Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
Since kraken, Ceph enforces a 1:1 correspondence between CRUSH ruleset and
CRUSH rule, so effectively ruleset and rule are the same thing, although
the term "ruleset" still survives - notably in the CRUSH rule itself, where it
effectively denotes the number of the rule.
This commit updates the documentation to more faithfully reflect the current
state of the code.
Fixes: http://tracker.ceph.com/issues/20559
Signed-off-by: Nathan Cutler <ncutler@suse.com>
On large clusters it might take a very long time to send data to Influx
due to the gathering and parsing of statistics.
By keeping a counter and printing it admins can adjust the interval if it
becomes to heavy for their cluster.
Signed-off-by: Wido den Hollander <wido@42on.com>
It's a lot like the Zabbix module and allows for setting configuration
options on run-time and also fetch them from the module.
A few additional commands have been registered to make sure it is easy
to interact with the module.
Signed-off-by: Wido den Hollander <wido@42on.com>
This allows for multiple Ceph clusters to send their data to the
same Influx database.
Using the fsid values for different clusters can be queried from
Influx
Signed-off-by: Wido den Hollander <wido@42on.com>
The code now scores:
Your code has been rated at 8.94/10
Various indentation fixes, whitespaces and other PEP-8 related changes
Signed-off-by: Wido den Hollander <wido@42on.com>
These callbacks are executed by finisher. When they are being executed,
Journaler can be in stopping state.
Fixes: http://tracker.ceph.com/issues/22360
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>