os/bluestore/KernelDevice: use flock(2) for block device lock
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
It's possible the accepting end knows the cookie but the connecting end
does not if the fault happens before it receives server_ident. If the
next connection attempt is in the other direction, we need to avoid a
reset or the queued messages at the first site will get lost.
Fixes: http://tracker.ceph.com/issues/38118
Signed-off-by: Sage Weil <sage@redhat.com>
Discard no longer guarantees zeroing, use BLKZEROOUT and "fallocate -z"
instead (blkdiscard(8) in xenial doesn't support -z).
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
* add needed forward declaration
* add necessary #includes
* move `#include "common/config.h"` to .cc, as it's not part of
interface.
Signed-off-by: Kefu Chai <kchai@redhat.com>
crimson can only update configuration async, so we cannot let
pick_addreses() call set_val_or_die() without chaning its function
signature.
for implementing crimson-osd, what we need is only a single
pick_addresses() variant, which returns entity_addrvec_t. so we just
enable it if WITH_SEASTAR is defined instead of adding a wrapper or
reimplement all pick_addresses() variants for crimson-osd.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* define OSDMapService interface to decouple the consumers of
this interface from its implementation -- the `OSD` class
* implement its methods in `OSD`
Signed-off-by: Kefu Chai <kchai@redhat.com>
* refs/pull/25703/head:
os/bluestore: option to disable bluestore warns on spillover.
mon: expose object store health warnings
osd: expose object store alerts
os/bluestore: indicate BlueFS spillover and lacking compressor alerts
os:enable ObjectStore::statfs() api to return OS alert list.
Reviewed-by: Sage Weil <sage@redhat.com>
The fcntl locks fail due to the classic posix lock gotcha: if you close
*any* fd to the same inode from the process, the lock(s) go away.
Use flock(2) instead. We have to be careful because we open the main
bluestore device via two KernelDevice instances: one for bluestore and
one for bluefs. Add a no-lock flag so that the bluefs instance does not
try to lock and does not conflict with bluestore's.
Fixes: http://tracker.ceph.com/issues/38150
Signed-off-by: Sage Weil <sage@redhat.com>
mgr/orchestrator: Unify `osd create` and `osd add`
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
mgr/dashboard: Added additional breadcrumb and tab tests to Cluster menu
Reviewed-by: Volker Theile <vtheile@suse.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reduce the complexity of the code by using the generic function, Py_BuildValue(), that can create most common objects from C values, directed by a format string.
Signed-off-by: Volker Theile <vtheile@suse.com>
Also:
* Added some more tests
* Better validation of drive Groups
* Simplified `TestWriteCompletion`
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>