]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: do not change pending if strategy is unchanged 50503/head
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 12 Jul 2023 20:16:17 +0000 (16:16 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 21 Jul 2023 14:13:38 +0000 (10:13 -0400)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mon/MonmapMonitor.cc

index 2ae4afaf0b8e42b9a45974320fbcb1f5a214f792..1226c8a82419089b7aacb4d1ff9af284ccd9d7dd 100644 (file)
@@ -929,6 +929,10 @@ bool MonmapMonitor::prepare_command(MonOpRequestRef op)
       err = -EINVAL;
       goto reply_no_propose;
     }
+    if (strategy == pending_map.strategy) {
+      err = 0;
+      goto reply_no_propose;
+    }
     pending_map.strategy = strategy;
     pending_map.last_changed = ceph_clock_now();
   } else if (prefix == "mon add disallowed_leader") {