From c697befe2b21543186b24b1092b79ddcd6a60273 Mon Sep 17 00:00:00 2001 From: vamahaja Date: Tue, 24 Mar 2020 21:00:35 +0530 Subject: [LibFix] Fix PVC create/status library timeouts Change-Id: I8e027ff71429cd73eea892c6e27d53f638badc42 Signed-off-by: vamahaja --- openshift-storage-libs/openshiftstoragelibs/baseclass.py | 7 ++++--- openshift-storage-libs/openshiftstoragelibs/openshift_ops.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'openshift-storage-libs') diff --git a/openshift-storage-libs/openshiftstoragelibs/baseclass.py b/openshift-storage-libs/openshiftstoragelibs/baseclass.py index 7a7b4251..738b5c92 100644 --- a/openshift-storage-libs/openshiftstoragelibs/baseclass.py +++ b/openshift-storage-libs/openshiftstoragelibs/baseclass.py @@ -321,7 +321,7 @@ class BaseClass(unittest.TestCase): def create_and_wait_for_pvcs( self, pvc_size=1, pvc_name_prefix="autotests-pvc", pvc_amount=1, - sc_name=None, timeout=120, wait_step=3, skip_waiting=False, + sc_name=None, timeout=600, wait_step=10, skip_waiting=False, skip_cleanup=False): """Create multiple PVC's not waiting for it @@ -400,10 +400,11 @@ class BaseClass(unittest.TestCase): def create_and_wait_for_pvc( self, pvc_size=1, pvc_name_prefix='autotests-pvc', sc_name=None, - skip_cleanup=False): + timeout=300, wait_step=10, skip_cleanup=False): self.pvc_name = self.create_and_wait_for_pvcs( pvc_size=pvc_size, pvc_name_prefix=pvc_name_prefix, - sc_name=sc_name, skip_cleanup=skip_cleanup)[0] + sc_name=sc_name, timeout=timeout, wait_step=wait_step, + skip_cleanup=skip_cleanup)[0] return self.pvc_name def create_pvcs_not_waiting( diff --git a/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py b/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py index aaf384d1..531e9d9b 100644 --- a/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py +++ b/openshift-storage-libs/openshiftstoragelibs/openshift_ops.py @@ -1183,7 +1183,7 @@ def get_pvc_status(hostname, pvc_name): return output -def wait_for_pvcs_be_bound(hostname, pvc_names, timeout=120, wait_step=3): +def wait_for_pvcs_be_bound(hostname, pvc_names, timeout=300, wait_step=10): """Wait for bunch of PVCs to be in 'Bound' state. Args: @@ -1246,7 +1246,7 @@ def wait_for_pvcs_be_bound(hostname, pvc_names, timeout=120, wait_step=3): raise exceptions.ExecutionError(error_msg) -def wait_for_pvc_be_bound(hostname, pvc_name, timeout=120, wait_step=3): +def wait_for_pvc_be_bound(hostname, pvc_name, timeout=300, wait_step=10): return wait_for_pvcs_be_bound( hostname, pvc_name, timeout=timeout, wait_step=wait_step) -- cgit