def test_create_scale_pods_and_pvcs_with_ms_consumers(
            self, create_scale_pods_and_pvcs_using_kube_job_on_ms_consumers):
        """
        Test create scale pods and PVCs using a kube job with MS consumers
        """
        self.orig_index = config.cur_index
        self.consumer_i_per_fio_scale = (
            create_scale_pods_and_pvcs_using_kube_job_on_ms_consumers(
                scale_count=self.scale_count,
                pvc_per_pod_count=self.pvc_per_pod_count,
            ))
        assert config.cur_index == self.orig_index, "The current index has changed"

        config.switch_to_provider()
        time_to_wait_for_io_running = 120
        log.info(f"Wait {time_to_wait_for_io_running} seconds for checking "
                 f"that the IO running as expected")
        sleep(time_to_wait_for_io_running)
        ceph_health_check()

        log.info("Checking the Ceph Health on the consumers")
        consumer_indexes = config.get_consumer_indexes_list()
        for i in consumer_indexes:
            config.switch_ctx(i)
            ceph_health_check()

        self.check_scale_pods_and_pvcs_created_on_consumers()
        log.info(
            "The scale pods and PVCs using a kube job with MS consumers created successfully"
        )
Exemple #2
0
        def finalizer():
            ocp_nodes = get_node_objs()
            for n in ocp_nodes:
                recover_node_to_ready_state(n)

            logger.info("Switch to the original cluster index")
            config.switch_ctx(self.orig_index)
            ceph_health_check()
 def test_create_scale_pods_and_pvcs_using_kube_job(
         self, create_scale_pods_and_pvcs_using_kube_job):
     """
     Test create scale pods and PVCs using a kube job
     """
     log.info("Start creating resources using kube job...")
     create_scale_pods_and_pvcs_using_kube_job()
     time_to_wait_for_io_running = 120
     log.info(f"Wait {time_to_wait_for_io_running} seconds for checking "
              f"that the IO running as expected")
     sleep(time_to_wait_for_io_running)
     ceph_health_check()
     log.info("The resources created successfully using the kube job")
    def test_create_scale_pods_and_pvcs_using_kube_job_ms(
            self, create_scale_pods_and_pvcs_using_kube_job):
        """
        Test create scale pods and PVCs using a kube job with managed service
        """
        self.orig_index = config.cur_index

        config.switch_to_consumer()
        log.info("Start creating resources using kube job...")
        create_scale_pods_and_pvcs_using_kube_job()
        ceph_health_check()

        log.info("Switch to the provider")
        config.switch_to_provider()
        time_to_wait_for_io_running = 120
        log.info(f"Wait {time_to_wait_for_io_running} seconds for checking "
                 f"that the IO running as expected")
        sleep(time_to_wait_for_io_running)
        ceph_health_check()

        log.info("Switch back to the consumer")
        config.switch_to_consumer()
        log.info("The resources created successfully using the kube job")