mirror of
https://github.com/ceph/ceph
synced 2025-03-08 17:28:40 +00:00
Because we don't (yet) properly prevent multiple sessions from daemons reporting the same name (e.g. rgws), storing it in the DaemonPerfCounters meant that one daemon's report was referring to another daemon's set of reported types. This should always have been a property of the session. The behaviour will still be ugly when multiple daemons are using the same name (stomping on each other's stats/statsu) but it shouldn't crash. Fixes: http://tracker.ceph.com/issues/21197 Signed-off-by: John Spray <john.spray@redhat.com>
36 lines
760 B
C++
36 lines
760 B
C++
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
|
|
// vim: ts=8 sw=2 smarttab
|
|
|
|
#ifndef CEPH_MGR_MGRSESSION_H
|
|
#define CEPH_MGR_MGRSESSION_H
|
|
|
|
#include "common/RefCountedObj.h"
|
|
#include "common/entity_name.h"
|
|
#include "msg/msg_types.h"
|
|
#include "mon/MonCap.h"
|
|
|
|
|
|
/**
|
|
* Session state associated with the Connection.
|
|
*/
|
|
struct MgrSession : public RefCountedObject {
|
|
uint64_t global_id = 0;
|
|
EntityName entity_name;
|
|
entity_inst_t inst;
|
|
|
|
int osd_id = -1; ///< osd id (if an osd)
|
|
|
|
// mon caps are suitably generic for mgr
|
|
MonCap caps;
|
|
|
|
std::set<std::string> declared_types;
|
|
|
|
MgrSession(CephContext *cct) : RefCountedObject(cct, 0) {}
|
|
~MgrSession() override {}
|
|
};
|
|
|
|
typedef boost::intrusive_ptr<MgrSession> MgrSessionRef;
|
|
|
|
|
|
#endif
|