]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Fix condition to check for ceph version mismatch 49989/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 22:00:33 +0000 (17:00 -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 0bbd96521cf941edb6946f5696fb10d8dfd7fc12..ed0f77a94f3026f8d7d060226c0f90c0d06c4f72 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);
   }
 }