This avoids calculating new pg creation mappings if the osdmap isn't
loaded yet, which currently happens when during Monitor::paxos_init()
on startup. Assuming osdmap epoch is nonzero, it should always be
safe to do this (although possibly unnecessary).
More cleanup here is certainly possible, but this is one step toward fixing
the bad behavior for #4675.
Signed-off-by: Sage Weil <sage@inktank.com>
update_trim();
- map_pg_creates();
- send_pg_creates();
+ if (mon->osdmon()->osdmap.get_epoch()) {
+ map_pg_creates();
+ send_pg_creates();
+ }
update_logger();
}
if (propose)
propose_pending();
- map_pg_creates();
- send_pg_creates();
+ if (mon->osdmon()->osdmap.get_epoch()) {
+ map_pg_creates();
+ send_pg_creates();
+ }
}
void PGMonitor::register_pg(pg_pool_t& pool, pg_t pgid, epoch_t epoch, bool new_pool)