case CEPH_ENTITY_TYPE_MDS: return "mds";
case CEPH_ENTITY_TYPE_OSD: return "osd";
case CEPH_ENTITY_TYPE_MON: return "mon";
+ case CEPH_ENTITY_TYPE_MGR: return "mgr";
case CEPH_ENTITY_TYPE_CLIENT: return "client";
case CEPH_ENTITY_TYPE_AUTH: return "auth";
default: return "unknown";
{ CEPH_ENTITY_TYPE_MON, "mon" },
{ CEPH_ENTITY_TYPE_OSD, "osd" },
{ CEPH_ENTITY_TYPE_MDS, "mds" },
+ { CEPH_ENTITY_TYPE_MGR, "mgr" },
{ CEPH_ENTITY_TYPE_CLIENT, "client" },
};
uint32_t get_type() const { return type; }
bool is_osd() const { return get_type() == CEPH_ENTITY_TYPE_OSD; }
+ bool is_mgr() const { return get_type() == CEPH_ENTITY_TYPE_MGR; }
bool is_mds() const { return get_type() == CEPH_ENTITY_TYPE_MDS; }
bool is_client() const { return get_type() == CEPH_ENTITY_TYPE_CLIENT; }
bool is_mon() const { return get_type() == CEPH_ENTITY_TYPE_MON; }
#define CEPH_ENTITY_TYPE_MDS 0x02
#define CEPH_ENTITY_TYPE_OSD 0x04
#define CEPH_ENTITY_TYPE_CLIENT 0x08
+#define CEPH_ENTITY_TYPE_MGR 0x10
#define CEPH_ENTITY_TYPE_AUTH 0x20
#define CEPH_ENTITY_TYPE_ANY 0xFF
static const int TYPE_MDS = CEPH_ENTITY_TYPE_MDS;
static const int TYPE_OSD = CEPH_ENTITY_TYPE_OSD;
static const int TYPE_CLIENT = CEPH_ENTITY_TYPE_CLIENT;
+ static const int TYPE_MGR = CEPH_ENTITY_TYPE_MGR;
static const int64_t NEW = -1;
static entity_name_t MDS(int64_t i=NEW) { return entity_name_t(TYPE_MDS, i); }
static entity_name_t OSD(int64_t i=NEW) { return entity_name_t(TYPE_OSD, i); }
static entity_name_t CLIENT(int64_t i=NEW) { return entity_name_t(TYPE_CLIENT, i); }
+ static entity_name_t MGR(int64_t i=NEW) { return entity_name_t(TYPE_MGR, i); }
int64_t num() const { return _num; }
int type() const { return _type; }
bool is_mds() const { return type() == TYPE_MDS; }
bool is_osd() const { return type() == TYPE_OSD; }
bool is_mon() const { return type() == TYPE_MON; }
+ bool is_mgr() const { return type() == TYPE_MGR; }
operator ceph_entity_name() const {
ceph_entity_name n = { _type, init_le64(_num) };
} else if (strstr(start, "client.") == start) {
_type = TYPE_CLIENT;
start += 7;
+ } else if (strstr(start, "mgr.") == start) {
+ _type = TYPE_MGR;
+ start += 4;
} else {
return false;
}
[1]
$ ceph-conf -c test.conf --name total.garbage
- error parsing 'total.garbage': expected string of the form TYPE.ID, valid types are: auth, mon, osd, mds, client
+ error parsing 'total.garbage': expected string of the form TYPE.ID, valid types are: auth, mon, osd, mds, mgr, client
[1]
$ ceph-conf -c test.conf -s bar