os/bluestore/KernelDevice: use flock(2) for block device lock
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.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>
Also:
* Added some more tests
* Better validation of drive Groups
* Simplified `TestWriteCompletion`
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
This command can hang (i.e., enter an infinite loop) due to
problematic bucket index entries left as a result of bug
https://tracker.ceph.com/issues/38007 .
The fix is to ignore the false bucket index entries -- since they do
not represent actual objects -- and remove all actual objects in the
bucket, so that bucket itself can be removed.
This fixes the both code paths whether `--bypass-gc` is specified or
not.
Furthermore, to made these operations more efficient, the internal
listing of the bucket is done unordered. This would improve behavior
when removing buckets with a large number of objects.
Fixes: http://tracker.ceph.com/issues/38134
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
* refs/pull/26193/head:
mds: move session setup to ms_handle_accept
common: add method to get StackStringStream ptr
Reviewed-by: Sage Weil <sage@redhat.com>
* refs/pull/26038/head:
mds: simplify recall warnings
mds: add extra details for cache drop output
qa: test mds_max_caps_per_client conf
mds: limit maximum number of caps held by session
mds: adapt drop cache for incremental recall
mds: recall caps incrementally
mds: adapt drop cache for incremental trim
mds: add throttle for trimming MDCache
mds: cleanup SessionMap init
mds: cleanup Session init
Reviewed-by: Zheng Yan <zyan@redhat.com>
Instead of a timeout and complicated decisions about whether the client is
releasing caps in an expeditious fashion, just use a DecayCounter that tracks
the number of caps we've recalled. This counter is decremented whenever the
client releases caps. If the counter passes a threshold, then we raise the
warning.
Similar reworking is done for the steady-state recall of client caps. Another
release DecayCounter is added so we can tell when the client is not releasing
any more caps.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Session setup in ms_handle_authentication is (historically) racy where multiple
connections from the same client can come in before one is finally accepted. A
session should only be created after ms_handle_accept. The MDS did some
backflips before this commit to ensure this.
Moreover, with the msgr2 changes, it is even more necessary since the address
nonce is not set until before ms_handle_accept is called.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
-filter out mons from other clusters
-fix parsing of mon name from role
Fixes: http://tracker.ceph.com/issues/38115
Signed-off-by: Casey Bodley <cbodley@redhat.com>