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
interface = 'CephFileSystem'
pvc_name = [<ocs_ci.ocs.resources.pvc.PVC object at 0x3fecc1b5b10>, <ocs_ci.ocs.resources.pvc.PVC object at 0x3fecc1b4760>, <ocs_...>, <ocs_ci.ocs.resources.pvc.PVC object at 0x3fecc1b4ca0>, <ocs_ci.ocs.resources.pvc.PVC object at 0x3fecc1b56f0>, ...]
status = 'start'
def get_provision_time(interface, pvc_name, status="start"):
"""
Get the starting/ending creation time of a PVC based on provisioner logs
Args:
interface (str): The interface backed the PVC
pvc_name (str / list): Name of the PVC(s) for creation time
the list will be list of pvc objects
status (str): the status that we want to get - Start / End
Returns:
datetime object: Time of PVC(s) creation
"""
# Define the status that need to retrieve
operation = "started"
if status.lower() == "end":
operation = "succeeded"
this_year = str(datetime.datetime.now().year)
# Get the correct provisioner pod based on the interface
pod_name = pod.get_csi_provisioner_pod(interface)
# get the logs from the csi-provisioner containers
logs = pod.get_pod_logs(pod_name[0], "csi-provisioner")
logs += pod.get_pod_logs(pod_name[1], "csi-provisioner")
logs = logs.split("\n")
# Extract the time for the one PVC provisioning
if isinstance(pvc_name, str):
stat = [i for i in logs if re.search(f"provision.*{pvc_name}.*{operation}", i)]
mon_day = " ".join(stat[0].split(" ")[0:2])
stat = f"{this_year} {mon_day}"
# Extract the time for the list of PVCs provisioning
if isinstance(pvc_name, list):
all_stats = []
for i in range(0, len(pvc_name)):
name = pvc_name[i].name
stat = [i for i in logs if re.search(f"provision.*{name}.*{operation}", i)]
> mon_day = " ".join(stat[0].split(" ")[0:2])
�[1m�[31mE IndexError: list index out of range�[0m
�[1m�[31mocs_ci/helpers/helpers.py�[0m:1566: IndexError
This issue is based on changes in the CSI provisioner logging introduced in ODF 4.17 and it still breaks many tests.
The text was updated successfully, but these errors were encountered:
manuelgotin
changed the title
TestBulkCloneCreation & TestPVCCreationPerformance failes in ODF 4.18
TestBulkCloneCreation & TestPVCCreationPerformance fails in ODF 4.18
Feb 18, 2025
This issue exists since ODF 4.17, please see the unresolved issue here: #10629
The following tests fails based on an index error:
The error:
This issue is based on changes in the CSI provisioner logging introduced in ODF 4.17 and it still breaks many tests.
The text was updated successfully, but these errors were encountered: