mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
Merge pull request #17940 from jcsp/wip-21534
mon: update get_store_prefixes implementations Reviewed-by: Joao Eduardo Luis <joao@suse.de> Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
d4da5e2063
@ -48,6 +48,10 @@ static ostream& _prefix(std::ostream *_dout, Monitor *mon, FSMap const& fsmap) {
|
||||
<< ").mds e" << fsmap.get_epoch() << " ";
|
||||
}
|
||||
|
||||
static const string MDS_METADATA_PREFIX("mds_metadata");
|
||||
static const string MDS_HEALTH_PREFIX("mds_health");
|
||||
|
||||
|
||||
/*
|
||||
* Specialized implementation of cmd_getval to allow us to parse
|
||||
* out strongly-typedef'd types
|
||||
@ -70,9 +74,6 @@ template<> bool cmd_getval(CephContext *cct, const cmdmap_t& cmdmap,
|
||||
return cmd_getval(cct, cmdmap, k, (int64_t&)val);
|
||||
}
|
||||
|
||||
static const string MDS_METADATA_PREFIX("mds_metadata");
|
||||
|
||||
|
||||
// my methods
|
||||
|
||||
void MDSMonitor::print_map(FSMap &m, int dbl)
|
||||
@ -88,6 +89,12 @@ void MDSMonitor::create_initial()
|
||||
dout(10) << "create_initial" << dendl;
|
||||
}
|
||||
|
||||
void MDSMonitor::get_store_prefixes(std::set<string>& s) const
|
||||
{
|
||||
s.insert(service_name);
|
||||
s.insert(MDS_METADATA_PREFIX);
|
||||
s.insert(MDS_HEALTH_PREFIX);
|
||||
}
|
||||
|
||||
void MDSMonitor::update_from_paxos(bool *need_bootstrap)
|
||||
{
|
||||
|
@ -34,14 +34,13 @@ class MMDSLoadTargets;
|
||||
class MMDSMap;
|
||||
class FileSystemCommandHandler;
|
||||
|
||||
#define MDS_HEALTH_PREFIX "mds_health"
|
||||
|
||||
class MDSMonitor : public PaxosService {
|
||||
public:
|
||||
MDSMonitor(Monitor *mn, Paxos *p, string service_name);
|
||||
|
||||
// service methods
|
||||
void create_initial() override;
|
||||
void get_store_prefixes(std::set<string>& s) const override;
|
||||
void update_from_paxos(bool *need_bootstrap) override;
|
||||
void init() override;
|
||||
void create_pending() override;
|
||||
|
@ -80,7 +80,8 @@
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
|
||||
#define dout_subsys ceph_subsys_mon
|
||||
#define OSD_PG_CREATING_PREFIX "osd_pg_creating"
|
||||
static const string OSD_PG_CREATING_PREFIX("osd_pg_creating");
|
||||
static const string OSD_METADATA_PREFIX("osd_metadata");
|
||||
|
||||
namespace {
|
||||
|
||||
@ -268,6 +269,7 @@ void OSDMonitor::get_store_prefixes(std::set<string>& s) const
|
||||
{
|
||||
s.insert(service_name);
|
||||
s.insert(OSD_PG_CREATING_PREFIX);
|
||||
s.insert(OSD_METADATA_PREFIX);
|
||||
}
|
||||
|
||||
void OSDMonitor::update_from_paxos(bool *need_bootstrap)
|
||||
|
@ -43,8 +43,6 @@ class MOSDMap;
|
||||
#include "erasure-code/ErasureCodeInterface.h"
|
||||
#include "mon/MonOpRequest.h"
|
||||
|
||||
#define OSD_METADATA_PREFIX "osd_metadata"
|
||||
|
||||
/// information about a particular peer's failure reports for one osd
|
||||
struct failure_reporter_t {
|
||||
utime_t failed_since; ///< when they think it failed
|
||||
|
Loading…
Reference in New Issue
Block a user