mirror of
https://github.com/ceph/ceph
synced 2025-01-19 09:32:00 +00:00
Merge pull request #16287 from liewegas/wip-try-decode
mon/MgrStatMonitor: do not crash on luminous dev version upgrades Reviewed-by: Yan, Zheng" <zyan@redhat.com> Reviewed-by: Jos Collin <jcollin@redhat.com>
This commit is contained in:
commit
808bd2ca93
@ -85,6 +85,7 @@ void MgrStatMonitor::update_from_paxos(bool *need_bootstrap)
|
||||
get_version(version, bl);
|
||||
if (version) {
|
||||
assert(bl.length());
|
||||
try {
|
||||
auto p = bl.begin();
|
||||
::decode(digest, p);
|
||||
::decode(health_summary, p);
|
||||
@ -93,6 +94,10 @@ void MgrStatMonitor::update_from_paxos(bool *need_bootstrap)
|
||||
dout(10) << __func__ << " v" << version
|
||||
<< " service_map e" << service_map.epoch << dendl;
|
||||
}
|
||||
catch (buffer::error& e) {
|
||||
derr << "failed to decode mgrstat state; luminous dev version?" << dendl;
|
||||
}
|
||||
}
|
||||
check_subs();
|
||||
update_logger();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user