]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: don't update pending service map epoch on receiving map from mon 37181/head
authorMykola Golub <mgolub@suse.com>
Wed, 2 Sep 2020 13:19:54 +0000 (14:19 +0100)
committerLaura Paduano <lpaduano@suse.com>
Wed, 16 Sep 2020 06:17:28 +0000 (08:17 +0200)
It may still be an older service map.

Fixes: https://tracker.ceph.com/issues/47275
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit b9edfbd55f897ebaaad56dc67c15887f57ab61ad)

src/mgr/DaemonServer.cc

index c547bff1dfeabd35a9ef7860fd6723a5e14230f4..d98901f07146833e078ea76226e7a941dfe25060 100644 (file)
@@ -2787,12 +2787,13 @@ void DaemonServer::got_service_map()
        // we just started up
        dout(10) << "got initial map e" << service_map.epoch << dendl;
        pending_service_map = service_map;
+       pending_service_map.epoch = service_map.epoch + 1;
       } else {
        // we we already active and therefore must have persisted it,
        // which means ours is the same or newer.
        dout(10) << "got updated map e" << service_map.epoch << dendl;
+       ceph_assert(pending_service_map.epoch > service_map.epoch);
       }
-      pending_service_map.epoch = service_map.epoch + 1;
     });
 
   // cull missing daemons, populate new ones