]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: look for mismatch in name only on secondary cluster
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
Wed, 19 Mar 2025 18:17:10 +0000 (23:47 +0530)
committerPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
Thu, 24 Apr 2025 15:56:35 +0000 (21:26 +0530)
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
src/tools/rbd_mirror/GroupReplayer.cc
src/tools/rbd_mirror/group_replayer/BootstrapRequest.cc

index 59d2e60482e1e54094dfa837dc363ce36aecfa98..9f6dbb27162896ff484cee5a07453b94ef7b5969 100644 (file)
@@ -241,6 +241,11 @@ void GroupReplayer<I>::destroy() {
 
 template <typename I>
 void GroupReplayer<I>::sync_group_names() {
+  if (m_local_group_ctx.primary) {
+    reregister_admin_socket_hook();
+    return;
+  }
+
   dout(10) << dendl;
 
   std::string local_group_name;
index c6a8424f34381356aabcc21f46ce0e8fcf6793f6..7b1cdf473f679af6ea20bf7e8b3df0e43ddda903 100644 (file)
@@ -595,8 +595,7 @@ void BootstrapRequest<I>::handle_get_local_group_name(int r) {
 
   if (m_group_name.empty()) {
     m_group_name = local_group_name;
-  } else if (m_group_name != local_group_name) {
-    // should never happen
+  } else if (m_group_name != local_group_name && m_remote_mirror_group_primary) {
     derr << "local group name '" << local_group_name << "' does not match "
          << "remote group name '" << m_group_name << "'" << dendl;
     finish(-EINVAL);