summaryrefslogtreecommitdiffstats
path: root/openshift-storage-libs/openshiftstoragelibs/baseclass.py
diff options
context:
space:
mode:
authornigoyal <nigoyal@redhat.com>2019-04-04 12:52:58 +0530
committerNitin Goyal <nigoyal@redhat.com>2019-07-09 16:01:38 +0530
commit1ef65c168d3b45a5af5d263ff3403263810a42d8 (patch)
tree3de3dee4c9a71636b7c0d02a2216ad0742112e8b /openshift-storage-libs/openshiftstoragelibs/baseclass.py
parent4a7a5f8037a9414c02cfeb39252ceb0742c793a3 (diff)
Add TC run IOs when gluster-blockd service is down
New TC verifies that it is possible to run IOs on block volumes when gluster-blockd service is down. Change-Id: Ia1de14d2990f833221f6725e9b0e48d77ef85c10
Diffstat (limited to 'openshift-storage-libs/openshiftstoragelibs/baseclass.py')
-rw-r--r--openshift-storage-libs/openshiftstoragelibs/baseclass.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/openshift-storage-libs/openshiftstoragelibs/baseclass.py b/openshift-storage-libs/openshiftstoragelibs/baseclass.py
index 8ca3a9a..62f2a1f 100644
--- a/openshift-storage-libs/openshiftstoragelibs/baseclass.py
+++ b/openshift-storage-libs/openshiftstoragelibs/baseclass.py
@@ -37,6 +37,7 @@ from openshiftstoragelibs.openshift_storage_libs import (
validate_multipath_pod,
)
from openshiftstoragelibs.openshift_version import get_openshift_version
+from openshiftstoragelibs.waiter import Waiter
class BaseClass(unittest.TestCase):
@@ -379,3 +380,17 @@ class GlusterBlockBaseClass(BaseClass):
self.node, pod_name, hacount, mpath=list(mpaths)[0])
return iqn, hacount, node
+
+ def verify_all_paths_are_up_in_multipath(
+ self, mpath_name, hacount, node, timeout=30, interval=5):
+ for w in Waiter(timeout, interval):
+ out = command.cmd_run('multipath -ll %s' % mpath_name, node)
+ count = 0
+ for line in out.split('\n'):
+ if 'active ready running' in line:
+ count += 1
+ if hacount == count:
+ break
+ self.assertEqual(hacount, count)
+ for state in ['failed', 'faulty', 'undef']:
+ self.assertNotIn(state, out)