You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test_ceph_capacity_recovery.py failing for power ODF 4.17.0-126
`self = <tests.functional.pv.pv_services.test_ceph_capacity_recovery.TestCephCapacityRecovery object at 0x7ffe99546490>
def test_capacity_recovery(
self,
):
log.info("Ceph Recovery test start")
get_used_capacity("Before pulling perf image")
helpers.pull_images(constants.PERF_IMAGE)
worker_nodes_list = node.get_worker_nodes()
assert len(worker_nodes_list) > 1
node_one = worker_nodes_list[0]
self.sc_obj = ocs.OCS(
kind="StorageCluster",
metadata={
"namespace": self.namespace,
"name": constants.CEPHFILESYSTEM_SC,
},
)
used_now = get_used_capacity("After pulling perf image")
self.num_of_pvcs = 10
self.pvc_size = (
self.ceph_capacity * (1 - used_now / 100 - 0.15) / self.num_of_pvcs
)
self.pvc_size_str = str(self.pvc_size) + "Gi"
log.info(f"Creating pvs of {self.pvc_size_str} size")
pvc_list = []
pod_list = []
for i in range(
int(self.num_of_pvcs / 2)
): # on each loop cycle 1 pvc and 1 clone
index = i + 1
log.info("Start creating PVC")
pvc_obj = helpers.create_pvc(
sc_name=self.sc_obj.name,
size=self.pvc_size_str,
namespace=self.namespace,
access_mode=constants.ACCESS_MODE_RWX,
)
helpers.wait_for_resource_state(pvc_obj, constants.STATUS_BOUND)
log.info(
f"PVC {pvc_obj.name} was successfully created in namespace {self.namespace}."
)
# Create a pod on one node
log.info(f"Creating Pod with pvc {pvc_obj.name} on node {node_one}")
pvc_obj.reload()
try:
pod_obj = helpers.create_pod(
interface_type=self.interface,
pvc_name=pvc_obj.name,
namespace=pvc_obj.namespace,
node_name=node_one,
pod_dict_path=constants.PERF_POD_YAML,
)
except Exception as e:
log.error(
f"Pod on PVC {pvc_obj.name} was not created, exception {str(e)}"
)
raise PodNotCreated("Pod on PVC was not created.")
# Confirm that pod is running on the selected_nodes
helpers.wait_for_resource_state(
resource=pod_obj, state=constants.STATUS_RUNNING, timeout=600
)
pvc_list.append(pvc_obj)
pod_list.append(pod_obj)
file_name = f"{pod_obj.name}-ceph_capacity_recovery"
log.info(f"Starting IO on the POD {pod_obj.name}")
filesize = int(float(self.pvc_size_str[:-2]) * 0.95)
# Change the file size to MB for the FIO function
file_size = f"{filesize * constants.GB2MB}M"
log.info(f"Going to write file of size {file_size}")
pod_obj.fillup_fs(
size=file_size, fio_filename=file_name, performance_pod=True
)
# Wait for fio to finish
No description provided.
The text was updated successfully, but these errors were encountered: