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>
* should install software-properties-common beforehand, otherwise
the `add-apt-repository` command will not be available.
* the update-alternative commandline were copied from ceph-build,
should remove the escape characters.
Signed-off-by: Kefu Chai <kchai@redhat.com>
We should call Locker:eval() for all imported inodes who have non-zero
'wanted caps'. MDS does not properly handle following case.
- client open a inode for read, it send a cap message to MDS.a (the cap
message updates 'wanted caps')
- MDS.a receive the cap message, the inode is non-auth and is ambiguous
auth. MDS.a can not request 'wanted caps' from auth mds.
- MDS.a finishes importing the inode from. But no caps are imported and
mds_caps_wanted map is empty.
The bug can cause read hang.
Fixes: http://tracker.ceph.com/issues/22357
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
If both --uid and --bucket args are provided, properly filtering
bucket stats by user_id and bucket_name.
Signed-off-by: Yao Zongyou <yaozongyou@vip.qq.com>