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