diff options
author | Apeksha D Khakharia <akhakhar@redhat.com> | 2018-08-28 13:46:44 +0530 |
---|---|---|
committer | Apeksha D Khakharia <akhakhar@redhat.com> | 2018-09-06 20:49:05 +0530 |
commit | 1c378d2f3f5d97583ec3310a14679035a967a9e3 (patch) | |
tree | 4da5c9ce0c37293d57c8fd74dbf39453f932231e /cns-libs/cnslibs/common/dynamic_provisioning.py | |
parent | 7023a7de286c3ffe8fd07818ae19fe928f276103 (diff) |
CNS: adding testcases for storage class
CNS-708,709,713,714,715
Change-Id: I61965e6d8b17b4bb49b10ebe26140945da9c4576
Signed-off-by: Apeksha D Khakharia <akhakhar@redhat.com>
Diffstat (limited to 'cns-libs/cnslibs/common/dynamic_provisioning.py')
-rw-r--r-- | cns-libs/cnslibs/common/dynamic_provisioning.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cns-libs/cnslibs/common/dynamic_provisioning.py b/cns-libs/cnslibs/common/dynamic_provisioning.py index 288d6245..70dffa4f 100644 --- a/cns-libs/cnslibs/common/dynamic_provisioning.py +++ b/cns-libs/cnslibs/common/dynamic_provisioning.py @@ -412,9 +412,13 @@ def verify_pvc_status_is_bound(hostname, pvc_name, timeout=120, wait_step=3): msg = "PVC %s has different status - %s" % (pvc_name, output) g.log.error(msg) if msg: - raise exceptions.ExecutionError(msg) + raise AssertionError(msg) if w.expired: + # for debug purpose to see why provisioning failed + cmd = "oc describe pvc %s | grep ProvisioningFailed" % pvc_name + ret, out, err = g.run(hostname, cmd, "root") + g.log.info("cmd %s - out- %s err- %s" % (cmd, out, err)) msg = ("Exceeded timeout of '%s' seconds for verifying PVC '%s' " "to reach the 'Bound' status." % (timeout, pvc_name)) g.log.error(msg) - raise exceptions.ExecutionError(msg) + raise AssertionError(msg) |