diff options
author | kshithijiyer <kshithij.ki@gmail.com> | 2020-08-06 21:47:41 +0530 |
---|---|---|
committer | kshithijiyer <kshithij.ki@gmail.com> | 2020-08-06 22:15:06 +0530 |
commit | 40f5b8754c854c07c38ee501c00a399df1ca1323 (patch) | |
tree | c4e6f390f879d5f6a192acb5a741f028101d7b07 /tests/functional/bvt | |
parent | 0b86bc1caa81ca558606d0e68fdf36f3eb5d4a59 (diff) |
[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 <kshithij.ki@gmail.com>
Diffstat (limited to 'tests/functional/bvt')
-rw-r--r-- | tests/functional/bvt/test_cvt.py | 20 |
1 files changed, 19 insertions, 1 deletions
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 " |