def test_target_side_failures_brick_failure_on_block_hosting_volume(self): """Target side failures - Brick failure on block hosting volume""" skip_msg = ("Skipping this test case due to bugs " "BZ-1634745, BZ-1635736, BZ-1636477, BZ-1641668") # TODO(vamahaja): Add check for CRS version if not self.is_containerized_gluster(): self.skipTest(skip_msg + " and not impleted CRS version check") if get_openshift_storage_version() < "3.11.2": self.skipTest(skip_msg) self.deploy_and_verify_resouces() # get block hosting volume from pvc name block_hosting_vol = self.get_block_hosting_volume_by_pvc_name( self.pvc_name) # restarts 2 brick processes of block hosting volume g_nodes = get_gluster_vol_hosting_nodes(block_hosting_vol) self.assertGreater(len(g_nodes), 2) restart_gluster_vol_brick_processes(self.oc_node, block_hosting_vol, g_nodes[:2]) # checks if all glusterfs services are in running state for g_node in g_nodes: for service in (SERVICE_BLOCKD, SERVICE_TCMU, SERVICE_TARGET): state = "exited" if service == SERVICE_TARGET else "running" self.assertTrue( wait_for_service_status_on_gluster_pod_or_node( self.oc_node, service, 'active', state, g_node)) # validates pvc, pv, heketi block and gluster block count after # service restarts self.validate_volumes_and_blocks()
def test_restart_services_provision_volume_and_run_io(self, service): """Restart gluster service then validate volumes""" block_hosting_vol = self.get_block_hosting_volume_by_pvc_name( self.pvc_name) g_nodes = get_gluster_vol_hosting_nodes(block_hosting_vol) self.assertGreater(len(g_nodes), 2) # restarts glusterfs service restart_service_on_gluster_pod_or_node( self.oc_node, service, g_nodes[0]) # wait for deployed user pod to be in Running state after restarting # service wait_for_pod_be_ready( self.oc_node, self.pod_name, timeout=60, wait_step=5) # checks if all glusterfs services are in running state for g_node in g_nodes: for service in (SERVICE_BLOCKD, SERVICE_TCMU, SERVICE_TARGET): status = "exited" if service == SERVICE_TARGET else "running" self.assertTrue(wait_for_service_status_on_gluster_pod_or_node( self.oc_node, service, status, g_node)) # validates pvc, pv, heketi block and gluster block count after # service restarts self.validate_volumes_and_blocks()
def test_restart_services_provision_volume_and_run_io(self, service): """Restart gluster service then validate volumes""" block_hosting_vol = self.get_block_hosting_volume_by_pvc_name( self.pvc_name) g_nodes = get_gluster_vol_hosting_nodes(block_hosting_vol) self.assertGreater(len(g_nodes), 2) # restarts glusterfs service restart_service_on_gluster_pod_or_node(self.oc_node, service, g_nodes[0]) # wait for deployed user pod to be in Running state after restarting # service wait_for_pod_be_ready(self.oc_node, self.pod_name, timeout=60, wait_step=5) # checks if all glusterfs services are in running state for g_node in g_nodes: for service in (SERVICE_BLOCKD, SERVICE_TCMU, SERVICE_TARGET): status = "exited" if service == SERVICE_TARGET else "running" self.assertTrue( wait_for_service_status_on_gluster_pod_or_node( self.oc_node, service, status, g_node)) # validates pvc, pv, heketi block and gluster block count after # service restarts self.validate_volumes_and_blocks()
def test_restart_services_provision_volume_and_run_io(self, service): """Restart gluster service then validate volumes""" skip_msg = ("Skipping this test case due to bugs " "BZ-1634745, BZ-1635736, BZ-1636477, BZ-1641668") # TODO(vamahaja): Add check for CRS version if not self.is_containerized_gluster(): self.skipTest(skip_msg + " and not implemented CRS version check") if get_openshift_storage_version() < "3.11.2": self.skipTest(skip_msg) self.deploy_and_verify_resouces() block_hosting_vol = self.get_block_hosting_volume_by_pvc_name( self.pvc_name) g_nodes = get_gluster_vol_hosting_nodes(block_hosting_vol) self.assertGreater(len(g_nodes), 2) # restarts glusterfs service restart_service_on_gluster_pod_or_node(self.oc_node, service, g_nodes[0]) # wait for deployed user pod to be in Running state after restarting # service wait_for_pod_be_ready(self.oc_node, self.pod_name, timeout=60, wait_step=5) # checks if all glusterfs services are in running state for g_node in g_nodes: for service in (SERVICE_BLOCKD, SERVICE_TCMU, SERVICE_TARGET): state = "exited" if service == SERVICE_TARGET else "running" self.assertTrue( wait_for_service_status_on_gluster_pod_or_node( self.oc_node, service, 'active', state, g_node)) # validates pvc, pv, heketi block and gluster block count after # service restarts self.validate_volumes_and_blocks()
def test_target_side_failures_brick_failure_on_block_hosting_volume(self): """Target side failures - Brick failure on block hosting volume""" # get block hosting volume from pvc name block_hosting_vol = self.get_block_hosting_volume_by_pvc_name( self.pvc_name) # restarts 2 brick processes of block hosting volume g_nodes = get_gluster_vol_hosting_nodes(block_hosting_vol) self.assertGreater(len(g_nodes), 2) restart_gluster_vol_brick_processes( self.oc_node, block_hosting_vol, g_nodes[:2]) # checks if all glusterfs services are in running state for g_node in g_nodes: for service in (SERVICE_BLOCKD, SERVICE_TCMU, SERVICE_TARGET): status = "exited" if service == SERVICE_TARGET else "running" self.assertTrue(wait_for_service_status_on_gluster_pod_or_node( self.oc_node, service, status, g_node)) # validates pvc, pv, heketi block and gluster block count after # service restarts self.validate_volumes_and_blocks()
def test_target_side_failures_brick_failure_on_block_hosting_volume(self): """Target side failures - Brick failure on block hosting volume""" # get block hosting volume from pvc name block_hosting_vol = self.get_block_hosting_volume_by_pvc_name( self.pvc_name) # restarts 2 brick processes of block hosting volume g_nodes = get_gluster_vol_hosting_nodes(block_hosting_vol) self.assertGreater(len(g_nodes), 2) restart_gluster_vol_brick_processes(self.oc_node, block_hosting_vol, g_nodes[:2]) # checks if all glusterfs services are in running state for g_node in g_nodes: for service in (SERVICE_BLOCKD, SERVICE_TCMU, SERVICE_TARGET): status = "exited" if service == SERVICE_TARGET else "running" self.assertTrue( wait_for_service_status_on_gluster_pod_or_node( self.oc_node, service, status, g_node)) # validates pvc, pv, heketi block and gluster block count after # service restarts self.validate_volumes_and_blocks()