]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: fix missing initialization of Peer UUID
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
Wed, 8 Apr 2026 18:39:17 +0000 (00:09 +0530)
committerSuper User <root@li-4c4c4544-0051-4710-8053-c6c04f423534.ibm.com>
Thu, 11 Jun 2026 11:16:45 +0000 (16:46 +0530)
Initialize the uuid member in the Peer constructor and include it in
stream output operator to ensure correct peer identification in logs.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
src/tools/rbd_mirror/Types.h

index c4357d9f2d852918b348693b0bb363a879e32a5f..f5e9c67fde84209d18dbb6d7e2527d6bcb8a945c 100644 (file)
@@ -103,7 +103,8 @@ struct Peer {
        librados::IoCtx& io_ctx,
        const RemotePoolMeta& remote_pool_meta,
        MirrorStatusUpdater<I>* mirror_status_updater)
-    : io_ctx(io_ctx),
+    : uuid(uuid),
+      io_ctx(io_ctx),
       remote_pool_meta(remote_pool_meta),
       mirror_status_updater(mirror_status_updater) {
   }
@@ -115,7 +116,8 @@ struct Peer {
 
 template <typename I>
 std::ostream& operator<<(std::ostream& os, const Peer<I>& peer) {
-  return os << peer.remote_pool_meta;
+  return os << "uuid=" << peer.uuid << ", "
+            << peer.remote_pool_meta;
 }
 
 struct PeerSpec {