We now rely on the session -> connection ref for printing
remote addr, peer_global_id, and so on. Change this code to
break the ref cycle instead by removing the con->session link,
which is only needed by the MonOpRequest ctor called at the top
of _ms_dispatch.
Signed-off-by: Sage Weil <sage@redhat.com>
The PaxosServiceMessage method relies on the msg -> con -> session linkage,
and the con -> session link is not present for forwarded messages. Also,
the message path is redundant and unnecessary.
Signed-off-by: Sage Weil <sage@redhat.com>
The situation is a bit different here than the MDS and OSD because the
authentication happens from MAuth instead of ms_verify_authorizer, but
we are moving toward being more consistent.
Signed-off-by: Sage Weil <sage@redhat.com>
This is shown to corrupt otherwise healthy rocksdb databases. Rename to
make it clear that it is generally not safe to run and shoud only be used
as a last resort.
Signed-off-by: Sage Weil <sage@redhat.com>
* refs/pull/24535/head:
mon: consider AUTH_NONE clients which "authenticate" to be finished
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
osd: do not overestimate the size of the object for reads with trimtrunc
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed By: Xie Xingguo <xie.xingguo@zte.com.cn>
We need to populate both the last_epoch_clean and last_epoch_started
accurately when fabricating a pg merge target. In the case where the
premerge PG peers, recovers (e.g., backfill), then becomes ready to
merge, the last_epoch_clean may be > the last_epoch_started, and using
the later last_epoch_clean will prevent the PG from subsequently
peering (it'll go to incomplete state instead).
Fix by keeping both values, separately.
Signed-off-by: Sage Weil <sage@redhat.com>
* refs/pull/24270/head:
osd: make 'cache drop' command require 'executable' permission
osd: rename 'drop cache' and 'get cache stats' to group them by component
doc: add documentation for 'drop cache' and 'get cache stats'
osd: don't print osdmap cache stats in 'get cache stats' command
osd: do not clear osdmap cache on 'drop cache' command
osd: offload dumping cache stats to the object store
osd: pass a stream to flush_cache commands for more verbosity
osd: implement flush_cache() method for Filestore
osd: add clear_cache and get_cache_object_count commands
Reviewed-by: Gregory Farnum <gfarnum@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Before setting size equal to op.extent.truncate_size, we need to check
if the size of the object is greater than the truncate_size. We do not
need to set size to op.extent.truncate_size, in the case where the size of
the object is less than op.extent.truncate_size.
Without this change, we were always setting size =
op.extent.truncate_size, when (seq < op.extent.truncate_seq) and
(op.extent.offset + op.extent.length > op.extent.truncate_size), were both
true. This ended up in:
1. overestimating the size of the object
2. not considering the correct size of the object, for
the later checks, which calculate op.extent.length for the read ops
3. causing crashes when trying to read more data than what was present
Fixes: http://tracker.ceph.com/issues/21931
Fixes: http://tracker.ceph.com/issues/22330
Signed-off-by: Neha Ojha <nojha@redhat.com>
The failure interval needs to be sufficiently precise that it establishes
an approximate upper bound on the device life expectancy.
Also, deal with the fact that the max value may be '0.000000' intead of ''.
Signed-off-by: Sage Weil <sage@redhat.com>
This makes it easier to re-run tests against a suite branch without
requiring a full ceph-ci build and repo.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>