Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestBulkCloneCreation & TestPVCCreationPerformance fails in ODF 4.18 #11432

Open
manuelgotin opened this issue Feb 18, 2025 · 0 comments
Open

Comments

@manuelgotin
Copy link

This issue exists since ODF 4.17, please see the unresolved issue here: #10629

The following tests fails based on an index error:

  • test_pvc_bulk_clone_performance::TestBulkCloneCreation
  • test_pvc_bulk_creation_deletion_performance.py::TestPVCCreationPerformance

The error:

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.

@manuelgotin manuelgotin changed the title TestBulkCloneCreation & TestPVCCreationPerformance failes in ODF 4.18 TestBulkCloneCreation & TestPVCCreationPerformance fails in ODF 4.18 Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant