]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/rbd: adjust grep invocation in is_leader()
authorIlya Dryomov <idryomov@gmail.com>
Sun, 16 Mar 2025 16:33:58 +0000 (17:33 +0100)
committerPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
Thu, 24 Apr 2025 15:56:35 +0000 (21:26 +0530)
admin_daemon() no longer populates stdout and stderr, all output is
redirected inside of run_cmd_internal().

This unbreaks "TEST: release leader and wait it is reacquired".

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
qa/workunits/rbd/rbd_mirror_ha.sh

index e5a086b82ab8652aa227a2d609e54ed8be5eaa4e..7add522f5285e88241bd0ff38630c72e2158ab68 100755 (executable)
@@ -19,8 +19,8 @@ is_leader()
     test -n "${pool}" || pool=${POOL}
 
     admin_daemon "${CLUSTER1}:${instance}" \
-                rbd mirror status ${pool} ${CLUSTER2}${PEER_CLUSTER_SUFFIX} |
-       grep '"leader": true'
+                rbd mirror status ${pool} ${CLUSTER2}${PEER_CLUSTER_SUFFIX}
+    grep '"leader": true' < "${CMD_STDOUT}"
 }
 
 wait_for_leader()