| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
If we start the command before we get the mgrmap at the client, we
will send MCommand via a different code path; make sure it behaves
correctly too.
Missed this in 6f35d2835268eade059535b62378d6d407ef9e87
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that we now sub to the mgrmap after init because the MgrClient
connection to the mgr is driven by receipt of the MgrMap.
This is important so that the MDS does not have metadata with the mgr
when the mons are ignoring the MDS otherwise due to CompatSet
incompatibilities.
Fixes: https://tracker.ceph.com/issues/41538
Fixes: https://tracker.ceph.com/issues/42635
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
|
|
|
| |
Fix fc60989bf7a72c35b8f6b8fec2407b3080ad9bbd, which reversed this
condition.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not open a mgr daemon session if we are a client using a non-client
key to authenticate. This is a bit of a corner case, but it can
happen when using the mon. key do bootstrap functions.
This aligns the MgrClient condition with the mgr/DaemonServer.cc
handle_report condition, which rejects non-daemon client connections
based on the connection entity type, not the auth identity.
Fixes: https://tracker.ceph.com/issues/42566
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can't use the feature bit for the MCommand connection to tell whether
it is a tell or CLI command because new clients may have to send CLI
commands via MCommand for old clusters, and they don't always know whether
this mgr is new or old yet.
Prior to octopus, MCommand contained a mon/mgr CLI command, and did not
have the fsid field set. Start populating the fsid field, and use this
to signal whether a client is a new MgrClient that knows MCommand vs
MMgrCommand. If we get an MCommand with the fsid set, that means it is
a tell command; otherwise, it's an old client sending a CLI command.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
| |
This lets the caller say "tell the active mgr", whoever it may be.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
| |
Note that the initial implementation can only target the active mgr!
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
| |
The main motivation for this change is to avoid copies due to the use of
boost::function/std::function where captures of std::unique_ptr (in
subsequent commits) would fail to compile.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
|
|
|
| |
This allows us to (eventually) leave MCommand for tell-style commands
only.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Additionally, introduce `task status` field in manager report
messages to forward status of executing tasks in daemons (e.g.,
status of executing scrubs in ceph metadata servers).
`task status` makes its way upto service map which is then used
to display the relevant information in ceph status.
Signed-off-by: Venky Shankar <vshankar@redhat.com>
|
|
|
|
| |
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
| |
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
| |
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
| |
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
|
|
|
|
|
|
| |
The mgr client will eventually connect and issue the command so it's not
necessary to spam the logs at level 0.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
| |
Fixes: http://tracker.ceph.com/issues/37864
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|\
| |
| |
| |
| | |
common,crimson: port perfcounters to seastar
Reviewed-by: Kefu Chai <kchai@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
extract PerfCounterCollectionImpl and move m_lock out
from perfcounters.cc to upper,then seastar osd can reuse
functions in perfcounters.cc.
Signed-off-by: chunmei Liu <chunmei.liu@intel.com>
|
|/
|
|
|
| |
Fixes: https://tracker.ceph.com/issues/36091
Signed-off-by: Mykola Golub <mgolub@suse.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@redhat.com>
|
|\
| |
| |
| |
| | |
mgr: update MMgrConfigure message to include optional OSD perf queries
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
|
| |
| |
| |
| |
| | |
Fixes: https://tracker.ceph.com/issues/35914
Signed-off-by: Julien Collet <julien.collet@cern.ch>
|
|/
|
|
| |
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
|
|
|
|
|
|
| |
Otherwise a cli command may unexpectedly hang forever with not output
because no ceph-mgr is running, which can be confusing for an admin.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Without holiding the lock update_daemon_health() can race with
send_report() corrupting the daemon_health_metrics vector.
Fixes: http://tracker.ceph.com/issues/23352
Signed-off-by: Kjetil Joergensen <kjetil@medallia.com>
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this change introduce three classes: ConfigValues, ConfigProxy and
ConfigReader. in seastar port of OSD, each CPU shard will hold its own
reference of configuration, and upon changes of settings, each
shard will be updated with the new setting in async. so this forces us
to be able to keep two set of configuration at the same time. so we
need to extract the changeable part of md_config_t out. so we can
replace the old one with new one on demand, and let different shards
share the same unchanged part, amon the other things, the Options map
and the lookup tables. that's why we need ConfigValues. we will add
a policy template for this class, so we can specialize for Seastar
implementation to allow different ConfigProxy instances to point
md_config_impl<> to different ConfigValues.
because the observer interface is still using md_config_t, to minimise
the impact of this change, handle_conf_change() and
handle_subsys_change() are not changed. but as it accepts a `const
md_config_t`, which cannot be used to create/reference the ConfigProxy
holding it, we need to introduce ConfigReader for reading the updated
setting from md_config_t in a simpler way, without exposing the
internal "values" member variable.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
This does several entity_addr_t -> entity_addrvec_t conversions across the
mgr code.
(Note that entity_addr_t and entity_addrvec_t already encode in an
interoperable way.)
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This is for use when talking to pre-luminous
clusters, where we should not block waiting
for MgrMap because it might never come.
Fixes: https://tracker.ceph.com/issues/23627
Signed-off-by: John Spray <john.spray@redhat.com>
|
|
|
|
|
|
| |
Fixes: http://tracker.ceph.com/issues/23846
Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
|\
| |
| |
| |
| |
| | |
mgr: allow service daemons to unregister from ServiceMap
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we are a service daemon, send a MMgrClose on shutdown to clear ourselves
out of the ServiceMap.
Note that this is a best-effort attempt; we don't block shutdown if the
mgr isn't currently available.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|/
|
|
|
|
| |
daemon name
Signed-off-by: runsisi <runsisi@zte.com.cn>
|
|\
| |
| |
| |
| | |
mon,mgr: make osd_metric more popular and report slow ops to mgr
Reviewed-by: Kefu Chai <kchai@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: lvshanchun <lvshanchun@gmail.com>
|
|/
|
|
|
|
|
|
|
| |
ms_handle_reset() races with send_pgstats(), and the latter could
reference a session with a null connection. so we need to guard
send_pgstats() with a lock.
Fixes: http://tracker.ceph.com/issues/23370
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
| |
The mgr already treats the config_bl as optional in the MMgrReport
messages.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
| |
Leave them encoded until they are used, since usually we won't use them.
This is about 50k currently.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
| |
Signed-off-by: Rubab Syed<rubab.syed21@gmail.com>
|
|
|
|
|
|
|
| |
This is a portion of Part 1 of the namespace project: using ADL
properly in encode and decode so we can use namespaces easily in Ceph.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
|
|
|
| |
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
| |
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
|
|
| |
to be consistent with other caller sites of add_event_after(). the
original intention of doing so, is to avoid double free of the callback
to be added if we are stopping and the timer refuses to add this
callback.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
| |
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
|
| |
This awkwardly involves re-ordering some definitions
in perf_counters.h in order to refer to the prio
names defined in PerfCountersBuilder.
Signed-off-by: John Spray <john.spray@redhat.com>
|
|
|
|
| |
Signed-off-by: John Spray <john.spray@redhat.com>
|
|
|
|
| |
Signed-off-by: John Spray <john.spray@redhat.com>
|
|
|
|
|
|
|
|
| |
...so that we can control the level of load
we're putting on ceph-mgr with perf counters. Don't collect
anything below PRIO_USEFUL by default.
Signed-off-by: John Spray <john.spray@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
otherwise
* we will try to cancel it even it's never been added
* we will keep a dangling pointer around. which is, well,
scaring.
* static analyzer will yell at us:
Memory - illegal accesses (USE_AFTER_FREE)
Signed-off-by: Kefu Chai <kchai@redhat.com>
|