summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkshithijiyer <kshithij.ki@gmail.com>2020-07-29 21:34:59 +0530
committerArthy Loganathan <aloganat@redhat.com>2020-07-31 06:38:33 +0000
commitd6524ea86144c76ff3d0278b54892864e2841178 (patch)
tree776af7dd98a673b3a726248e5a7119428603f081
parent8d2d0fff2a58ad9d9bf7126dde9e8ab556c8183b (diff)
[Testfix] Add logic to collect additional info
Adding code to get dir tree and dump all xattr for Bug 1810901. Change-Id: Ia59dcd2623e845066e31037c96a64249efa074c2 Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
-rw-r--r--tests/functional/bvt/test_cvt.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/functional/bvt/test_cvt.py b/tests/functional/bvt/test_cvt.py
index e758d42..a3be671 100644
--- a/tests/functional/bvt/test_cvt.py
+++ b/tests/functional/bvt/test_cvt.py
@@ -41,13 +41,15 @@ from glustolibs.gluster.volume_libs import (
from glustolibs.gluster.volume_libs import (
log_volume_info_and_status, expand_volume, shrink_volume,
replace_brick_from_volume, wait_for_volume_process_to_be_online)
+from glustolibs.gluster.glusterfile import get_fattr_list
from glustolibs.gluster.rebalance_ops import (rebalance_start,
wait_for_rebalance_to_complete,
rebalance_status)
from glustolibs.gluster.brick_libs import (select_bricks_to_bring_offline,
bring_bricks_offline,
bring_bricks_online,
- are_bricks_offline)
+ are_bricks_offline,
+ get_all_bricks)
from glustolibs.gluster.heal_libs import monitor_heal_completion
from glustolibs.gluster.quota_ops import (quota_enable, quota_disable,
quota_limit_usage,
@@ -294,6 +296,19 @@ class TestGlusterShrinkVolumeSanity(GlusterBasicFeaturesSanityBaseClass):
# Shrinking volume by removing bricks from volume when IO in progress
g.log.info("Start removing bricks from volume when IO in progress")
ret = shrink_volume(self.mnode, self.volname)
+
+ # Temporary code:
+ # Additional checks to gather infomartion from all
+ # servers for Bug 1810901.
+ if not ret and self.volume_type == 'distributed-dispersed':
+ for brick_path in get_all_bricks(self.mnode, self.volname):
+ node, path = brick_path.split(':')
+ ret, out, _ = g.run(node, 'find {}/'.format(path))
+ g.log.info(out)
+ for filedir in out.split('\n'):
+ ret = get_fattr_list(node, filedir)
+ g.log.info(ret)
+
self.assertTrue(ret, ("Failed to shrink the volume when IO in "
"progress on volume %s", self.volname))
g.log.info("Shrinking volume when IO in progress is successful on "