From 8804c9499e9ed0d37823dc55d03eb7792907cf0b Mon Sep 17 00:00:00 2001 From: ShwethaHP Date: Mon, 22 Jan 2018 16:05:21 +0530 Subject: Fixing the test_self_heal_when_io_is_in_progress testcase for dispersed volume. Refer to bug: https://bugzilla.redhat.com/show_bug.cgi?id=1470938 Change-Id: Iea327d87c6decbd0d607cb4abcb55384e8463614 Signed-off-by: ShwethaHP --- tests/functional/bvt/test_cvt.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tests/functional/bvt') diff --git a/tests/functional/bvt/test_cvt.py b/tests/functional/bvt/test_cvt.py index 14af6a072..81f692c9b 100644 --- a/tests/functional/bvt/test_cvt.py +++ b/tests/functional/bvt/test_cvt.py @@ -60,6 +60,7 @@ from glustolibs.io.utils import (validate_io_procs, list_all_files_and_dirs_mounts, view_snaps_from_mount, wait_for_io_to_complete) +from glustolibs.gluster.volume_ops import set_volume_options from glustolibs.gluster.exceptions import ExecutionError @@ -691,6 +692,26 @@ class TestGlusterHealSanity(GlusterBasicFeaturesSanityBaseClass): - wait for heal to complete - validate IO """ + # Check if volume type is dispersed. If the volume type is + # dispersed, set the volume option 'disperse.optimistic-change-log' + # to 'off' + # Refer to: https://bugzilla.redhat.com/show_bug.cgi?id=1470938 + if 'dispersed' in self.volume_type and 'nfs' in self.mount_type: + g.log.info("Set volume option 'disperse.optimistic-change-log' " + "to 'off' on a dispersed volume . " + "Refer to bug: " + "https://bugzilla.redhat.com/show_bug.cgi?id=1470938") + ret = set_volume_options(self.mnode, self.volname, + {'disperse.optimistic-change-log': 'off'} + ) + self.assertTrue(ret, ("Failed to set the volume option %s to " + "off on volume %s", + 'disperse.optimistic-change-log', + self.volname) + ) + g.log.info("Successfully set the volume option " + "'disperse.optimistic-change-log' to 'off'") + # Log Volume Info and Status before simulating brick failure g.log.info("Logging volume info and Status before bringing bricks " "offlien from the volume %s", self.volname) -- cgit