]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Fix condition to check for ceph version mismatch 48265/head
authorPrashant D <pdhange@redhat.com>
Tue, 27 Sep 2022 02:40:45 +0000 (22:40 -0400)
committerPrashant D <pdhange@redhat.com>
Tue, 27 Sep 2022 02:40:45 +0000 (22:40 -0400)
MON fails to send MMgrUpdate to the MGR to update
DaemonState with correct metadata information due to
incorrect conditional check. Send MMgrUpdate to MGR
if we observe ceph version mismatch after an election
is over.

Fixes: https://tracker.ceph.com/issues/57678
Signed-off-by: Prashant D <pdhange@redhat.com>
src/mon/Monitor.cc

index 0846fa0a8f00bd771ebccf1496b7149970c2eea4..8e48bf0c25415e6ee8bc9320f2d989f1a5f16308 100644 (file)
@@ -2975,7 +2975,7 @@ void Monitor::update_pending_metadata()
   const std::string current_version = mon_metadata[rank]["ceph_version_short"];
   const std::string pending_version = metadata["ceph_version_short"];
 
-  if (current_version.compare(0, version_size, pending_version) < 0) {
+  if (current_version.compare(0, version_size, pending_version) != 0) {
     mgr_client.update_daemon_metadata("mon", name, metadata);
   }
 }