During kraken, when we first introduced the mgrs, we wouldn't populate
the on-disk command descriptions on create_initial(). Therefore, if we
are upgrading from a cluster that never had a mgr, we may end up
crashing because we have no cmd descs to load from disk.
Fixes: http://tracker.ceph.com/issues/21300
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
{
pending_map = map;
pending_map.epoch++;
+
+ if (map.get_epoch() == 1 &&
+ command_descs.empty() &&
+ pending_command_descs.empty()) {
+ // we've been through the initial map and we haven't populated the
+ // command_descs vector. This likely means we came from kraken, where
+ // we wouldn't populate the vector, nor would we write it to disk, on
+ // create_initial().
+ create_initial();
+ }
}
health_status_t MgrMonitor::should_warn_about_mgr_down()