]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: display mirror uuid for mirror pool info output 59417/head
authorN Balachandran <nibalach@redhat.com>
Tue, 17 Sep 2024 09:18:03 +0000 (14:48 +0530)
committerN Balachandran <nibalach@redhat.com>
Tue, 17 Sep 2024 10:22:02 +0000 (15:52 +0530)
Includes the mirror_uuid in the mirror pool info command
output.

Signed-off-by: N Balachandran <nibalach@redhat.com>
doc/man/8/rbd.rst
src/tools/rbd/action/MirrorPool.cc

index 24d4fa4a31d51118e75ec4e9fe6442fee6afa974..4039e78fad3ad230f40788152fae30c1aaf09da0 100644 (file)
@@ -543,9 +543,9 @@ Commands
 
 :command:`mirror pool info` [*pool-name*]
   Show information about the pool or namespace mirroring configuration.
-  For both pools and namespaces, it includes the mirroring mode
+  For both pools and namespaces, it includes the mirroring mode, mirror UUID
   and remote namespace. For pools, it additionally includes the site name,
-  peer UUID, mirror UUID, remote cluster name, and remote client name.
+  peer UUID, remote cluster name, and remote client name.
 
 :command:`mirror pool peer add` [*pool-name*] *remote-cluster-spec*
   Add a mirroring peer to a pool.
index 88e578cba9196cb7d6d568d6b1eefda9d989e48f..58e2d4dc329af222fb8eb73ededae739ae836864 100644 (file)
@@ -1437,6 +1437,10 @@ int execute_info(const po::variables_map &vm,
   }
 
   if (mirror_mode != RBD_MIRROR_MODE_DISABLED) {
+    r = rbd.mirror_uuid_get(io_ctx, &mirror_uuid);
+    if (r < 0) {
+      return r;
+    }
     r = rbd.mirror_remote_namespace_get(io_ctx, &remote_namespace);
     if (r < 0) {
       return r;
@@ -1475,8 +1479,10 @@ int execute_info(const po::variables_map &vm,
       }
     }
     if (formatter != nullptr) {
+      formatter->dump_string("mirror_uuid", mirror_uuid);
       formatter->dump_string("remote_namespace", remote_namespace);
     } else {
+      std::cout << "Mirror UUID: " << mirror_uuid << std::endl;
       std::cout << "Remote Namespace: " << remote_namespace << std::endl
                << std::endl;
     }