]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Fix condition to check for ceph version mismatch 49988/head
authorPrashant D <pdhange@redhat.com>
Tue, 27 Sep 2022 02:40:45 +0000 (22:40 -0400)
committerPrashant D <pdhange@redhat.com>
Fri, 3 Feb 2023 21:30:17 +0000 (16:30 -0500)
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>
(cherry picked from commit 5dc0d6f7f299cc7af0c243ba67036b075f4b72af)

src/mon/Monitor.cc

index ce7ec37d9cffa11eec2f64f58bd4f63ea935690c..dd665d599bd5e3e48846351c12c6f5d86b45949b 100644 (file)
@@ -2988,7 +2988,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);
   }
 }