From 40f5b8754c854c07c38ee501c00a399df1ca1323 Mon Sep 17 00:00:00 2001 From: kshithijiyer Date: Thu, 6 Aug 2020 21:47:41 +0530 Subject: [Testfix] Add logic to log more info Adding code to get dir tree and dump all xattr in hex for Bug 1810901 before remove-brick also adding logic to set log-level to debug. Change-Id: I9c9c970c4de7d313832f6f189cdca8428a073b1e Signed-off-by: kshithijiyer --- tests/functional/bvt/test_cvt.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'tests/functional/bvt/test_cvt.py') diff --git a/tests/functional/bvt/test_cvt.py b/tests/functional/bvt/test_cvt.py index a3be67117..664652290 100644 --- a/tests/functional/bvt/test_cvt.py +++ b/tests/functional/bvt/test_cvt.py @@ -293,6 +293,24 @@ class TestGlusterShrinkVolumeSanity(GlusterBasicFeaturesSanityBaseClass): g.log.info("Successful in logging volume info and status of volume %s", self.volname) + # Temporary code: + # Additional checks to gather infomartion from all + # servers for Bug 1810901 and setting log level to debug. + for opt in ('diagnostics.brick-log-level', + 'diagnostics.client-log-level '): + ret = set_volume_options(self.mnode, self.volname, + {opt: 'DEBUG'}) + if not ret: + g.log.error('Failed to set volume option %s', opt) + if 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, encode_hex=True) + g.log.info(ret) + # 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) @@ -306,7 +324,7 @@ class TestGlusterShrinkVolumeSanity(GlusterBasicFeaturesSanityBaseClass): ret, out, _ = g.run(node, 'find {}/'.format(path)) g.log.info(out) for filedir in out.split('\n'): - ret = get_fattr_list(node, filedir) + ret = get_fattr_list(node, filedir, encode_hex=True) g.log.info(ret) self.assertTrue(ret, ("Failed to shrink the volume when IO in " -- cgit