summaryrefslogtreecommitdiffstats
path: root/src/mon/MgrMap.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-23 16:45:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-23 16:45:13 +0000
commit389020e14594e4894e28d1eb9103c210b142509e (patch)
tree2ba734cdd7a243f46dda7c3d0cc88c2293d9699f /src/mon/MgrMap.h
parentAdding upstream version 18.2.2. (diff)
downloadceph-389020e14594e4894e28d1eb9103c210b142509e.tar.xz
ceph-389020e14594e4894e28d1eb9103c210b142509e.zip
Adding upstream version 18.2.3.upstream/18.2.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/mon/MgrMap.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mon/MgrMap.h b/src/mon/MgrMap.h
index f37ed97fd..b36acef5a 100644
--- a/src/mon/MgrMap.h
+++ b/src/mon/MgrMap.h
@@ -225,6 +225,10 @@ public:
epoch_t epoch = 0;
epoch_t last_failure_osd_epoch = 0;
+
+ static const uint64_t FLAG_DOWN = (1<<0);
+ uint64_t flags = 0;
+
/// global_id of the ceph-mgr instance selected as a leader
uint64_t active_gid = 0;
/// server address reported by the leader once it is active
@@ -401,7 +405,7 @@ public:
ENCODE_FINISH(bl);
return;
}
- ENCODE_START(12, 6, bl);
+ ENCODE_START(13, 6, bl);
encode(epoch, bl);
encode(active_addrs, bl, features);
encode(active_gid, bl);
@@ -425,13 +429,14 @@ public:
// backwards compatible messsage for older monitors.
encode(clients_addrs, bl, features);
encode(clients_names, bl, features);
+ encode(flags, bl);
ENCODE_FINISH(bl);
return;
}
void decode(ceph::buffer::list::const_iterator& p)
{
- DECODE_START(12, p);
+ DECODE_START(13, p);
decode(epoch, p);
decode(active_addrs, p);
decode(active_gid, p);
@@ -498,11 +503,15 @@ public:
}
}
}
+ if (struct_v >= 13) {
+ decode(flags, p);
+ }
DECODE_FINISH(p);
}
void dump(ceph::Formatter *f) const {
f->dump_int("epoch", epoch);
+ f->dump_int("flags", flags);
f->dump_int("active_gid", get_active_gid());
f->dump_string("active_name", get_active_name());
f->dump_object("active_addrs", active_addrs);