summaryrefslogtreecommitdiffstats
path: root/tests/features
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2017-11-03 11:49:42 +0530
committerAtin Mukherjee <amukherj@redhat.com>2018-03-06 14:41:44 +0000
commit685d4409f9405a527c87b41d1d89f798729d30f4 (patch)
tree18d51816cc62a1fad82397ef6b4ff92159d83b97 /tests/features
parent51d34907986fba09a560aa18238944811fc47b6a (diff)
hooks: add a script to stat the subdirs in add-brick
The subdirectories are expected to be present for a subdir mount to be successful. If not, the client_handshake() itself fails to succeed. When a volume is about to get mounted first time, this is easier to handle, as if the directory is not present in one brick, then its mostly not present in any other brick. In case of add-brick, the directory is not present in new brick, and there is no chance of healing it from the subdirectory mount, as in those clients, the subdir itself will be 'root' ('/') of the filesystem. Hence we need a volume mount to heal the directory before connections can succeed. This patch does take care of that by healing the directories which are expected to be mounted as subdirectories from the volume level mount point. Change-Id: I2c2ac7b7567fe209aaa720006d09b68584d0dd14 BUG: 1549915 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'tests/features')
-rw-r--r--tests/features/subdir-mount.t16
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/features/subdir-mount.t b/tests/features/subdir-mount.t
index 1742f8655e8..8401946fb0f 100644
--- a/tests/features/subdir-mount.t
+++ b/tests/features/subdir-mount.t
@@ -98,22 +98,14 @@ TEST test "$mount_inode" == "1"
TEST umount $M2
-# because the subdir is not yet 'healed', below should fail.
+# Now the exported subdirs should be automatically healed due to
+# hook scripts. Check if the mount is successful.
TEST $GFS --subdir-mount /subdir2 -s $H0 --volfile-id $V0 $M2
mount_inode=$(stat --format "%i" "$M2")
-TEST test "$mount_inode" != "1"
-
-# Allow the heal to complete
-TEST stat $M0/subdir1/subdir1.1/subdir1.2/subdir1.2_file;
-TEST stat $M0/subdir2/
-
-# Now the mount should succeed
-TEST $GFS --subdir-mount /subdir2 -s $H0 --volfile-id $V0 $M1
-TEST stat $M1
+TEST test "$mount_inode" == "1"
-# umount $M1 / $M2
TEST umount $M0
-TEST umount $M1
+TEST umount $M2
TEST $CLI volume stop $V0;