glusterfs/0326-tests-subdir-mount.t-is-failing-for-brick_mux-regrss.patch
Rinku Kothiya 6e04ab4906 autobuild v6.0-23
Resolves: bz#1344758 bz#1599802 bz#1685406 bz#1686800 bz#1724021
Resolves: bz#1726058 bz#1727755 bz#1731513 bz#1741193 bz#1758923
Resolves: bz#1761326 bz#1761486 bz#1762180 bz#1764095 bz#1766640
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
2019-11-21 01:11:39 -05:00

52 lines
1.8 KiB
Diff

From a4f01ad90a0c0dfd0655da509c5ed2a11a507cc3 Mon Sep 17 00:00:00 2001
From: Mohit Agrawal <moagrawal@redhat.com>
Date: Mon, 17 Jun 2019 11:10:42 +0530
Subject: [PATCH 326/335] tests: subdir-mount.t is failing for brick_mux
regrssion
To avoid the failure wait to run hook script S13create-subdir-mounts.sh
after executed add-brick command by test case.
This is required as a dependency for the bz referenced below.
Backport of https://review.gluster.org/c/glusterfs/+/22877
Change-Id: I063b6d0f86a550ed0a0527255e4dfbe8f0a8c02e
BUG: 1686800
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/185857
Tested-by: RHGS Build Bot <nigelb@redhat.com>
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
---
tests/features/subdir-mount.t | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/tests/features/subdir-mount.t b/tests/features/subdir-mount.t
index 8401946..a02bd6b 100644
--- a/tests/features/subdir-mount.t
+++ b/tests/features/subdir-mount.t
@@ -85,12 +85,17 @@ TEST $CLI volume start $V0
TEST $GFS --subdir-mount /subdir1/subdir1.1/subdir1.2 -s $H0 --volfile-id $V0 $M2
TEST stat $M2
+initcnt=`grep -i create-subdir-mounts /var/log/glusterfs/glusterd.log | wc -l`
# mount shouldn't fail even after add-brick
TEST $CLI volume add-brick $V0 replica 2 $H0:$B0/${V0}{5,6};
-# Give time for client process to get notified and use the new
-# volfile after add-brick
-sleep 1
+# Wait to execute create-subdir-mounts.sh script by glusterd
+newcnt=`grep -i create-subdir-mounts /var/log/glusterfs/glusterd.log | wc -l`
+while [ $newcnt -eq $initcnt ]
+do
+ newcnt=`grep -i create-subdir-mounts /var/log/glusterfs/glusterd.log | wc -l`
+ sleep 1
+done
# Existing mount should still be active
mount_inode=$(stat --format "%i" "$M2")
--
1.8.3.1