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

Investigate test_capacity_recovery #10800

Open
keemano opened this issue Nov 5, 2024 · 1 comment
Open

Investigate test_capacity_recovery #10800

keemano opened this issue Nov 5, 2024 · 1 comment
Assignees
Labels
Medium Priority Fix this after High Priority tickets are fixed. Squad/Green

Comments

@keemano
Copy link
Contributor

keemano commented Nov 5, 2024

No description provided.

@keemano keemano added Medium Priority Fix this after High Priority tickets are fixed. Squad/Green labels Nov 5, 2024
@keemano keemano self-assigned this Nov 5, 2024
@veerareddylucky
Copy link

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
      pod_obj.get_fio_results(timeout=3600)

tests/functional/pv/pv_services/test_ceph_capacity_recovery.py:186: `

test_capacity_recovery.log
test_capacity_recovery1.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Medium Priority Fix this after High Priority tickets are fixed. Squad/Green
Projects
None yet
Development

No branches or pull requests

2 participants