some code coexist in crimson seastar environment and posix environment,
so add namespace to avoid same function conflict, for example add namespace
for CephContext, since the new namespace for classic ceph-osd,
need modify all files declare use CephContext by including "common_fwd.h"
which defined the namespace for each environment.
Signed-off-by: Chunmei Liu <chunmei.liu@intel.com>
Set the default budget based on the current defaults: 3000 per osd, and a
rule of thumb target of 100 PGs per OSD. Set the per-PG trim target
by dividing the overall value by the number of PGs on the OSD.
Increase the max pg log length alone, so if the OSD has <100 PGs,
those PGs will get more entries. Reduce the minimum to be smaller than
the max. Use the min/max config options to bracket what is allocated to
a single PG.
Signed-off-by: Sage Weil <sage@redhat.com>
* refs/pull/32132/head:
osd/OSDMap: rename old calc_pg_role -> calc_pg_role_broken
osd/OSDMap: remove dead osd_is_valid_op_target
osd/OSDMap: fix get_pg_acting_role()
osd: use spg_t for pending_creates_from_osd
osd/OSDMap: drop unused get_pg_acting_role()
osd/OSDMap: fix+simplify is_up_acting_osd_shard
osd: use new and improved calc_pg_role()
osd/OSDMap: new calc_pg_role() that takes a pg_shard_t
osd/OSDMap: calc_pg_rank -> calc_pg_role
osd/PeeringState: debug lines for upacting_features, proc_lease
osd/PeeringState: use pg_vector_string for operator<<
Reviewed-by: Samuel Just <sjust@redhat.com>
templatize metrics collection so as to reuse quering routines.
`MetricCollector` can be subclassed and along with implementing
` process_reports()` to process incoming metrics data.
also, generalize metrics data in `MMgrReport` and metric query
configuration in `MMgrConfigure`.
Signed-off-by: Venky Shankar <vshankar@redhat.com>
instead of accessing OSDService's member variable directly, it would be
easier if we can use accessors to do this.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* refs/pull/31778/head:
os/bluestore: pin onodes as they are added to the cache
Revert "Revert "Merge pull request #30964 from markhpc/wip-bs-cache-trim-pinned""
Reviewed-by: Mark Nelson <mnelson@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
This reverts commit 669453138d, reversing
changes made to 36f5fcbb97.
Signed-off-by: Sage Weil <sage@redhat.com>
- conflicts due to code rearrangement in 14b0db908f
This reverts commit 304c37f521, reversing
changes made to 7b4f9a083f.
This causes some bluestore test failures due to an ENOENT right after a
new object is created. The simplest reproducer is the
ObjectStore/StoreTest.FiemapEmpty/2 test.
Fixes: https://tracker.ceph.com/issues/42495
Signed-off-by: Sage Weil <sage@redhat.com>
OpQueue is overkill for mclock based schedulers. The interface doesn't
need to externalize the _strict modifiers, the scheduler can figure that
out from the item itself. Introduce simpler Scheduler interface and add
an adapter for the existing OpQueue based implementations.
Signed-off-by: Samuel Just <sjust@redhat.com>
* refs/pull/30217/head:
crimson: common/admin_socket kludge so that it builds
mon/MonClient: fix sending mon command to a specific rank
src/.gitignore: ignore .tox
mon/MonClient: interpret numeric mon target name as rank
mgr,mgr/MgrClient: use fsid to signal mon-mgr vs cli MCommands
qa/workunits/cephtool: fix errpr checks for 'ceph daemon' commands
common/ceph_context: make 'config unset' idempotent
qa/tasks/dump_stuck: mon.a, not mon.0
qa/suites/rados/singleton/all/admin-socket: fix test
common/config: EPERM setting config option after startup
qa/workunits/cephtool/test.sh: fix tell output error check
common/admin_socket: pass Formatter from generic infrastructure
common/admin_socket: pass ostream to call() for error output
os/bluestore: fix asok hook return value
rgw: fix asok return value
common/ceph_context: return error code from asok commands
test/pybind/test_rados: fix accidental mon tell test
mon: print entity_name along with caps to debug log
PendingReleaseNotes: notes about asok changes
mgr/MgrClient: empty target string for 'tell' means active mgr
common/admin_socket: report error code as part of output string
osd: change trigger_[deep_]scrub tommands to a pg tell command
osd: remove old command workqueue, threadpool
osd: drop MMonCommand handling
osdc/Objecter: resend OSD tell commands on EAGAIN
osd: route tell commands to asok; migrate commands
osd: use unique_ptr<Formatter> for asok_command
common/ceph_context: add generic asok 'injectargs'
common/admin_socket: allow dup prefixes
common/admin_socket: refactor with sync and async execute_command variants
common/admin_socket: pass input bufferlist
osd: transition to call_async() for asok
common/admin_socket: support alternative call_async()
mon/MonClient: send tell commands out of band via MCommand
mon: accept tell commands via MCommand and send them to asok handler
common/admin_socket: return int from hook call()
mgr/DaemonServer: route MCommand (for octopus+) to asok commands
do not use 'ceph tell mgr'
pybind/ceph_argparse: disambiguate mgr tell and CLI commands
ceph: make 'ceph tell mgr.*' send to the active mgr
ceph: send 'ceph tell mgr.X' to the right mgr
librados: add rados_mgr_command_target
mgr/MgrClient: add start_command variant that takes a target
common/admin_socket: drop unregister_command(); use per-hook variant
common/admin_socket: drop explicit prefix arg to register_command
common/admin_socket: simplify command routing
common/admin_socket: add ability to process MCommand via asok queue
common/admin_socket: pass cmdvec to execute_command
common/admin_socket: use pipe for general wakeup
include/compat: add flags arg to pipe_cloexec
common/admin_socket: drop unused args
Reviewed-by: Neha Ojha <nojha@redhat.com>
The implementation can choose to either use the provided Formatter, or
put something directly into outbl. The implementation may choose to
flush the formatter to the output buffer|stream, or let the caller do it
for them (usually the latter).
Lots of fiddling/cleanup in the implementations to make this build,
including dropping the (seeminlyg unused?) ostream& output mode for
the librbd asok implementations.
Signed-off-by: Sage Weil <sage@redhat.com>
Also, don't allow children to set nref (to 0). This is the more significant
change as it required fixing various code to not do this:
<reftype> ptr = new RefCountedObjectFoo(..., 0);
as a way to create a starting reference with nref==1. This is a pretty
bad code smell so I've converted all the code doing this to use the new
factory method which produces the reference safely:
auto ptr = ceph::make_ref<RefCountedObjectFoo>(...);
libradosstriper was particularly egregious in its abuse of setting the starting
nref. :(
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/pull/29820/head:
osd/PeeringState: log_weirdness during peering
osd/PeeringState: send new message types
osd/PeeringState: give require_osd_release to BufferedRecoveryMessages
osd: add new notify, query, and info messages
osd/PeeringState: use send_info() for replica activation ack
osd/PeeringState: remove old info_map member
osd/PeeringState: send infos via message_map (not info_map)
osd/PeeringState: remove old query_map member
osd/PeeringState: send queries via message_map (not query_map)
osd/PeeringState: use return value from discover_all_missing
osd/PeeringState: give PeeringCtxWrapper a BufferedRecoveryMessages ref
osd/PeeringState: send notifies via message_map (not notify_list)
osd/PeeringState: add message_map to PeeringCtx/BufferedRecoveryMessages
osd: dispatch_context inside PG lock
Reviewed-by: Samuel Just <sjust@redhat.com>
This is similar to how recovery reservations are split between
local and remote.
It was the case that scrubs_pending was used for reservations at
the replicas as well as at the primary while requesting reservations
from the replicas. There was no need for scrubs_pending to turn
into scrubs_active at the primary as nothing treated that value
as special. scrubber.active = true when scrubbing is
actually going.
Now scurbber.local_reserved indicates scrubs_local incremented
Now scrubber.remote_reserved indicates scrubs_remote incremented
Fixes: https://tracker.ceph.com/issues/41669
Signed-off-by: David Zafman <dzafman@redhat.com>
These are streamlined to only include the information we need for the
peering events, as reflected by the old handle_fast_pg_{notify,query,info}
messages.
Signed-off-by: Sage Weil <sage@redhat.com>