From 5a8d41ca7481a0af767596454ad25e0948543bc6 Mon Sep 17 00:00:00 2001 From: Chris Chien Date: Thu, 6 Feb 2025 12:18:24 +0800 Subject: [PATCH 1/4] test(integration): support v2 volume test on test_kubernetes.py ref: longhorn/longhorn 9760 Signed-off-by: Chris Chien --- manager/integration/tests/test_kubernetes.py | 24 ++++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/manager/integration/tests/test_kubernetes.py b/manager/integration/tests/test_kubernetes.py index 3e86272475..31f6c612bb 100644 --- a/manager/integration/tests/test_kubernetes.py +++ b/manager/integration/tests/test_kubernetes.py @@ -30,6 +30,7 @@ from common import update_setting from common import SETTING_DEGRADED_AVAILABILITY from common import wait_statefulset, crash_engine_process_with_sigkill +from common import DATA_ENGINE from backupstore import backupstore_cleanup @@ -108,6 +109,7 @@ def provision_and_wait_pv(client, core_api, storage_class, pvc): # NOQA return pv +@pytest.mark.v2_volume_test # NOQA @pytest.mark.csi # NOQA def test_kubernetes_status(client, core_api, storage_class, # NOQA statefulset, csi_pv, pvc, pod): # NOQA @@ -311,6 +313,7 @@ def test_kubernetes_status(client, core_api, storage_class, # NOQA wait_delete_pv(core_api, p['pv_name']) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.csi # NOQA def test_pv_creation(client, core_api): # NOQA """ @@ -323,7 +326,8 @@ def test_pv_creation(client, core_api): # NOQA """ volume_name = "test-pv-creation" # NOQA client.create_volume(name=volume_name, size=SIZE, - numberOfReplicas=2) + numberOfReplicas=2, + dataEngine=DATA_ENGINE) volume = wait_for_volume_detached(client, volume_name) pv_name = "pv-" + volume_name @@ -348,6 +352,7 @@ def test_pv_creation(client, core_api): # NOQA delete_and_wait_pv(core_api, pv_name) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.csi # NOQA def test_pvc_creation_with_default_sc_set( client, core_api, storage_class, pod): # NOQA @@ -385,7 +390,8 @@ def test_pvc_creation_with_default_sc_set( volume_name = "test-pvc-creation-with-sc" # NOQA pod_name = "pod-" + volume_name client.create_volume(name=volume_name, size=SIZE, - numberOfReplicas=2) + numberOfReplicas=2, + dataEngine=DATA_ENGINE) volume = wait_for_volume_detached(client, volume_name) pv_name = "pv-" + volume_name @@ -498,6 +504,7 @@ def test_pvc_creation_with_default_sc_set( delete_and_wait_pv(core_api, pv_name) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.csi # NOQA def test_backup_kubernetes_status(set_random_backupstore, client, core_api, pod, storage_class): # NOQA """ @@ -536,7 +543,8 @@ def test_backup_kubernetes_status(set_random_backupstore, client, core_api, pod, volume_name = "test-backup-kubernetes-status-pod" # NOQA client.create_volume(name=volume_name, size=SIZE, - numberOfReplicas=2) + numberOfReplicas=2, + dataEngine=DATA_ENGINE) volume = wait_for_volume_detached(client, volume_name) pod_name = "pod-" + volume_name @@ -602,7 +610,8 @@ def test_backup_kubernetes_status(set_random_backupstore, client, core_api, pod, restore_name = generate_volume_name() client.create_volume(name=restore_name, size=SIZE, numberOfReplicas=2, - fromBackup=b.url) + fromBackup=b.url, + dataEngine=DATA_ENGINE) wait_for_volume_restoration_completed(client, restore_name) wait_for_volume_detached(client, restore_name) @@ -671,7 +680,8 @@ def test_backup_kubernetes_status(set_random_backupstore, client, core_api, pod, restore_name = generate_volume_name() client.create_volume(name=restore_name, size=SIZE, numberOfReplicas=2, - fromBackup=b.url) + fromBackup=b.url, + dataEngine=DATA_ENGINE) wait_for_volume_restoration_completed(client, restore_name) wait_for_volume_detached(client, restore_name) @@ -694,6 +704,7 @@ def test_backup_kubernetes_status(set_random_backupstore, client, core_api, pod, cleanup_volume(client, volume) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.csi # NOQA def test_delete_with_static_pv(client, core_api, volume_name): # NOQA """ @@ -731,6 +742,7 @@ def test_delete_with_static_pv(client, core_api, volume_name): # NOQA wait_delete_pvc(core_api, pvc_name) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.csi # NOQA def test_delete_with_provisioned_pv(client, core_api, storage_class, pvc): # NOQA """ @@ -757,6 +769,7 @@ def test_delete_with_provisioned_pv(client, core_api, storage_class, pvc): # NOQ wait_delete_pvc(core_api, pvc['metadata']['name']) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.csi # NOQA def test_delete_provisioned_pvc(client, core_api, storage_class, pvc): # NOQA """ @@ -781,6 +794,7 @@ def test_delete_provisioned_pvc(client, core_api, storage_class, pvc): # NOQA wait_for_volume_delete(client, volume_name) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.csi # NOQA def test_csi_umount_when_longhorn_block_device_is_disconnected_unexpectedly(client, core_api, statefulset, storage_class): # NOQA """ From 0f11735f8d0c9bdd5f8bd5e1b7d37e29dc5934cd Mon Sep 17 00:00:00 2001 From: Yang Chiu Date: Wed, 5 Feb 2025 13:42:09 +0800 Subject: [PATCH 2/4] ci: support air-gapped installation in helm chart pipeline Signed-off-by: Yang Chiu --- pipelines/helm/scripts/longhorn-setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pipelines/helm/scripts/longhorn-setup.sh b/pipelines/helm/scripts/longhorn-setup.sh index bd6a1d86d2..d29d46ff59 100755 --- a/pipelines/helm/scripts/longhorn-setup.sh +++ b/pipelines/helm/scripts/longhorn-setup.sh @@ -8,6 +8,7 @@ source pipelines/utilities/create_aws_secret.sh source pipelines/utilities/install_backupstores.sh source pipelines/utilities/create_longhorn_namespace.sh source pipelines/utilities/longhorn_helm_chart.sh +source pipelines/utilities/longhorn_ui.sh source pipelines/utilities/run_longhorn_test.sh # create and clean tmpdir @@ -50,6 +51,8 @@ main(){ if [[ "${LONGHORN_UPGRADE_TEST}" == true ]]; then get_longhorn_chart "${LONGHORN_STABLE_VERSION}" install_longhorn + setup_longhorn_ui_nodeport + export_longhorn_ui_url LONGHORN_UPGRADE_TEST_POD_NAME="longhorn-test-upgrade" UPGRADE_LH_TRANSIENT_VERSION="${LONGHORN_TRANSIENT_VERSION}" UPGRADE_LH_REPO_URL="${LONGHORN_REPO_URI}" @@ -63,7 +66,12 @@ main(){ run_longhorn_test else get_longhorn_chart + if [[ "${AIR_GAP_INSTALLATION}" == true ]]; then + customize_longhorn_chart_registry + fi install_longhorn + setup_longhorn_ui_nodeport + export_longhorn_ui_url run_longhorn_test fi From c4190c29a6e1ae4c2c4ea730371fb46dd4afc6b2 Mon Sep 17 00:00:00 2001 From: Chris Chien Date: Wed, 5 Feb 2025 16:08:55 +0800 Subject: [PATCH 3/4] test(integration): v2 volume for test_backing_image.py longhorn/longhorn-9760 Signed-off-by: Chris Chien --- manager/integration/tests/common.py | 8 +++-- .../integration/tests/test_backing_image.py | 34 ++++++++++++++++--- manager/integration/tests/test_basic.py | 3 ++ 3 files changed, 38 insertions(+), 7 deletions(-) diff --git a/manager/integration/tests/common.py b/manager/integration/tests/common.py index 2e4b0c134b..7f8de7ef22 100644 --- a/manager/integration/tests/common.py +++ b/manager/integration/tests/common.py @@ -5539,12 +5539,16 @@ def create_backing_image_with_matching_url(client, name, url, if url == BACKING_IMAGE_RAW_URL: expected_checksum = BACKING_IMAGE_RAW_CHECKSUM elif url == BACKING_IMAGE_QCOW2_URL: - expected_checksum = BACKING_IMAGE_QCOW2_CHECKSUM + if DATA_ENGINE == "v2": + expected_checksum = BACKING_IMAGE_RAW_CHECKSUM + else: + expected_checksum = BACKING_IMAGE_QCOW2_CHECKSUM bi = client.create_backing_image( name=name, sourceType=BACKING_IMAGE_SOURCE_TYPE_DOWNLOAD, parameters={"url": url}, expectedChecksum=expected_checksum, minNumberOfCopies=minNumberOfCopies, - nodeSelector=nodeSelector, diskSelector=diskSelector) + nodeSelector=nodeSelector, diskSelector=diskSelector, + dataEngine=DATA_ENGINE) assert bi is_ready = False diff --git a/manager/integration/tests/test_backing_image.py b/manager/integration/tests/test_backing_image.py index 70e9f815a3..2155a494bf 100644 --- a/manager/integration/tests/test_backing_image.py +++ b/manager/integration/tests/test_backing_image.py @@ -55,9 +55,11 @@ from common import BACKING_IMAGE_STATE_FAILED_AND_CLEANUP from common import BACKING_IMAGE_STATE_IN_PROGRESS from common import RETRY_COUNTS_LONG +from common import DATA_ENGINE import time +@pytest.mark.v2_volume_test # NOQA @pytest.mark.coretest # NOQA @pytest.mark.backing_image # NOQA def test_backing_image_basic_operation(client, volume_name): # NOQA @@ -123,6 +125,7 @@ def backing_image_basic_operation_test(client, volume_name, bi_name, bi_url): # client.delete(backing_image) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.coretest # NOQA @pytest.mark.backing_image # NOQA def test_backing_image_content(client, volume_name): # NOQA @@ -206,6 +209,7 @@ def backing_image_content_test(client, volume_name_prefix, bi_name, bi_url): # cleanup_host_disk(volume_name2) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.coretest # NOQA @pytest.mark.backing_image # NOQA def test_volume_basic_with_backing_image(client, volume_name): # NOQA @@ -262,6 +266,7 @@ def test_snapshot_prune_and_coalesce_simultaneously_with_backing_image(client, v cleanup_all_backing_images(client) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.coretest # NOQA @pytest.mark.backing_image # NOQA @pytest.mark.parametrize("volume_size", [str(BACKING_IMAGE_EXT4_SIZE), SIZE]) # NOQA @@ -276,6 +281,7 @@ def test_backup_with_backing_image(set_random_backupstore, client, volume_name, backupstore_cleanup(client) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.coretest # NOQA @pytest.mark.backing_image # NOQA def test_backup_labels_with_backing_image(set_random_backupstore, client, random_labels, volume_name): # NOQA @@ -289,6 +295,7 @@ def test_backup_labels_with_backing_image(set_random_backupstore, client, random backupstore_cleanup(client) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.coretest # NOQA @pytest.mark.backing_image # NOQA def test_ha_simple_recovery_with_backing_image(client, volume_name): # NOQA @@ -359,6 +366,7 @@ def test_engine_live_upgrade_rollback_with_backing_image(client, core_api, volum cleanup_all_backing_images(client) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.backing_image # NOQA @pytest.mark.csi # NOQA def test_csi_mount_with_backing_image(client, core_api, csi_pv_backingimage, pvc_backingimage, pod_make): # NOQA @@ -372,6 +380,7 @@ def test_csi_mount_with_backing_image(client, core_api, csi_pv_backingimage, pvc cleanup_all_backing_images(client) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.coretest # NOQA @pytest.mark.backing_image # NOQA @pytest.mark.csi # NOQA @@ -385,6 +394,7 @@ def test_csi_io_with_backing_image(client, core_api, csi_pv_backingimage, pvc_ba cleanup_all_backing_images(client) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.coretest # NOQA @pytest.mark.backing_image # NOQA @pytest.mark.csi # NOQA @@ -399,6 +409,7 @@ def test_csi_backup_with_backing_image(set_random_backupstore, client, core_api, backupstore_cleanup(client) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.backing_image # NOQA @pytest.mark.recurring_job # NOQA def test_recurring_job_labels_with_backing_image(set_random_backupstore, client, random_labels, volume_name): # NOQA @@ -486,7 +497,8 @@ def test_exporting_backing_image_from_volume(client, volume_name): # NOQA name=backing_img1_name, sourceType=BACKING_IMAGE_SOURCE_TYPE_FROM_VOLUME, parameters={"export-type": "qcow2", "volume-name": volume1_name}, - expectedChecksum="") + expectedChecksum="", + dataEngine=DATA_ENGINE) # Step4 volume2_name = "vol2" @@ -508,7 +520,8 @@ def test_exporting_backing_image_from_volume(client, volume_name): # NOQA name="bi-test2", sourceType=BACKING_IMAGE_SOURCE_TYPE_FROM_VOLUME, parameters={"export-type": "qcow2", "volume-name": volume2_name}, - expectedChecksum="") + expectedChecksum="", + dataEngine=DATA_ENGINE) # Step9 volume3_name = "vol3" @@ -521,6 +534,7 @@ def test_exporting_backing_image_from_volume(client, volume_name): # NOQA # Step10 check_volume_data(volume3, data2) + @pytest.mark.backing_image # NOQA @pytest.mark.parametrize("bi_url", [BACKING_IMAGE_QCOW2_URL, BACKING_IMAGE_RAW_URL]) # NOQA def test_backing_image_auto_resync(bi_url, client, volume_name): # NOQA @@ -567,6 +581,7 @@ def test_backing_image_auto_resync(bi_url, client, volume_name): # NOQA assert volume.size == str(BACKING_IMAGE_EXT4_SIZE) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.backing_image # NOQA def test_backing_image_cleanup(core_api, client): # NOQA """ @@ -630,6 +645,7 @@ def backing_image_cleanup(core_api, client): # NOQA assert exist is False +@pytest.mark.v2_volume_test # NOQA @pytest.mark.backing_image # NOQA @pytest.mark.parametrize("bi_url", [BACKING_IMAGE_QCOW2_URL, BACKING_IMAGE_RAW_URL]) # NOQA def test_backing_image_with_wrong_md5sum(bi_url, client): # NOQA @@ -640,7 +656,8 @@ def test_backing_image_with_wrong_md5sum(bi_url, client): # NOQA client.create_backing_image(name=BACKING_IMAGE_NAME, sourceType=BACKING_IMAGE_SOURCE_TYPE_DOWNLOAD, parameters={"url": bi_url}, - expectedChecksum=backing_image_wrong_checksum) + expectedChecksum=backing_image_wrong_checksum, + dataEngine=DATA_ENGINE) wait_for_backing_image_status(client, BACKING_IMAGE_NAME, BACKING_IMAGE_STATE_FAILED_AND_CLEANUP) @@ -680,7 +697,8 @@ def test_volume_wait_for_backing_image_condition(client): # NOQA name=backing_img_name, sourceType=BACKING_IMAGE_SOURCE_TYPE_FROM_VOLUME, parameters={"export-type": "qcow2", "volume-name": volume1_name}, - expectedChecksum="") + expectedChecksum="", + dataEngine=DATA_ENGINE) # Create volume with that backing image volume2_name = "vol2" @@ -707,6 +725,7 @@ def test_volume_wait_for_backing_image_condition(client): # NOQA assert vol1_cksum == vol2_cksum +@pytest.mark.v2_volume_test # NOQA @pytest.mark.backing_image # NOQA def test_backing_image_min_number_of_replicas(client): # NOQA """ @@ -750,6 +769,7 @@ def test_backing_image_min_number_of_replicas(client): # NOQA cleanup_all_backing_images(client) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.backing_image # NOQA def test_backing_image_selector_setting(client, volume_name): # NOQA """ @@ -792,7 +812,8 @@ def test_backing_image_selector_setting(client, volume_name): # NOQA numberOfReplicas=1, diskSelector=volume_disk_selector, nodeSelector=volume_node_selector, - backingImage=BACKING_IMAGE_NAME) + backingImage=BACKING_IMAGE_NAME, + dataEngine=DATA_ENGINE) vol = wait_for_volume_detached(client, volume_name) assert vol.diskSelector == volume_disk_selector assert vol.nodeSelector == volume_node_selector @@ -802,6 +823,7 @@ def test_backing_image_selector_setting(client, volume_name): # NOQA cleanup_all_backing_images(client) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.backing_image # NOQA def test_backing_image_node_eviction(client): # NOQA """ @@ -834,6 +856,7 @@ def test_backing_image_node_eviction(client): # NOQA cleanup_all_backing_images(client) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.backing_image # NOQA def test_backing_image_disk_eviction(client): # NOQA """ @@ -877,6 +900,7 @@ def test_backing_image_disk_eviction(client): # NOQA cleanup_all_backing_images(client) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.backing_image # NOQA def test_backing_image_unable_eviction(client): # NOQA """ diff --git a/manager/integration/tests/test_basic.py b/manager/integration/tests/test_basic.py index 8e3546e06c..fc93eb92e7 100644 --- a/manager/integration/tests/test_basic.py +++ b/manager/integration/tests/test_basic.py @@ -5797,6 +5797,7 @@ def test_backuptarget_invalid(apps_api, # NOQA BACKUP_TARGET_MESSAGES_INVALID) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.volume_backup_restore # NOQA def test_volume_backup_and_restore_with_lz4_compression_method(client, set_random_backupstore, volume_name): # NOQA """ @@ -5829,6 +5830,7 @@ def test_volume_backup_and_restore_with_lz4_compression_method(client, set_rando compression_method=BACKUP_COMPRESSION_METHOD_LZ4) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.volume_backup_restore # NOQA def test_volume_backup_and_restore_with_gzip_compression_method(client, set_random_backupstore, volume_name): # NOQA """ @@ -5861,6 +5863,7 @@ def test_volume_backup_and_restore_with_gzip_compression_method(client, set_rand compression_method=BACKUP_COMPRESSION_METHOD_GZIP) +@pytest.mark.v2_volume_test # NOQA @pytest.mark.volume_backup_restore # NOQA def test_volume_backup_and_restore_with_none_compression_method(client, set_random_backupstore, volume_name): # NOQA """ From faed93b13e7176b59bb61c962bfc58e6102bedb9 Mon Sep 17 00:00:00 2001 From: Chris Chien Date: Thu, 6 Feb 2025 19:41:07 +0800 Subject: [PATCH 4/4] test(integration): add v2 volume test in test_zone.py ref longhorn/longhorn-9760 Signed-off-by: Chris Chien --- manager/integration/tests/test_zone.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/manager/integration/tests/test_zone.py b/manager/integration/tests/test_zone.py index 41f39155fc..9554b2d265 100644 --- a/manager/integration/tests/test_zone.py +++ b/manager/integration/tests/test_zone.py @@ -46,6 +46,7 @@ from common import SETTING_REPLICA_NODE_SOFT_ANTI_AFFINITY from common import SETTING_REPLICA_ZONE_SOFT_ANTI_AFFINITY from common import SETTING_REPLICA_AUTO_BALANCE +from common import DATA_ENGINE from test_scheduling import wait_new_replica_ready @@ -127,6 +128,7 @@ def get_zone_replica_count(client, volume_name, zone_name, chk_running=False): # return zone_replica_count +@pytest.mark.v2_volume_test # NOQA def test_zone_tags(client, core_api, volume_name, k8s_node_zone_tags): # NOQA """ Test anti affinity zone feature @@ -238,6 +240,7 @@ def test_zone_tags(client, core_api, volume_name, k8s_node_zone_tags): # NOQA assert lh_node_names == [] +@pytest.mark.v2_volume_test # NOQA @pytest.mark.node # NOQA def test_replica_zone_anti_affinity(client, core_api, volume_name, k8s_node_zone_tags): # NOQA """ @@ -304,6 +307,7 @@ def test_replica_zone_anti_affinity(client, core_api, volume_name, k8s_node_zone CONDITION_STATUS_TRUE) +@pytest.mark.v2_volume_test # NOQA def test_replica_auto_balance_zone_least_effort(client, core_api, volume_name): # NOQA """ Scenario: replica auto-balance zones with least-effort. @@ -425,6 +429,7 @@ def _set_and_wait_k8s_node_zone_label(): assert z3_r_count != 0 +@pytest.mark.v2_volume_test # NOQA def test_replica_auto_balance_zone_best_effort(client, core_api, volume_name): # NOQA """ Scenario: replica auto-balance zones with best-effort. @@ -545,6 +550,7 @@ def _set_and_wait_k8s_node_zone_label(): assert z3_r_count == 2 +@pytest.mark.v2_volume_test # NOQA def test_replica_auto_balance_when_disabled_disk_scheduling_in_zone(client, core_api, volume_name): # NOQA """ Scenario: replica auto-balance when disk scheduling is disabled on nodes @@ -593,7 +599,8 @@ def _set_and_wait_k8s_node_zone_label(): # Create a volume with 3 replicas num_of_replicas = 3 volume = client.create_volume(name=volume_name, - numberOfReplicas=num_of_replicas) + numberOfReplicas=num_of_replicas, + dataEngine=DATA_ENGINE) # Wait for the volume to detach and attach it to the test pod node volume = wait_for_volume_detached(client, volume_name) @@ -647,6 +654,7 @@ def assert_replica_count(is_stable=False): assert_replica_count(is_stable=True) +@pytest.mark.v2_volume_test # NOQA def test_replica_auto_balance_when_no_storage_available_in_zone(client, core_api, volume_name): # NOQA """ Scenario: replica auto-balance when there is no storage available on nodes @@ -699,7 +707,8 @@ def _set_and_wait_k8s_node_zone_label(): # Create a volume with 3 replicas num_of_replicas = 3 volume = client.create_volume(name=volume_name, - numberOfReplicas=num_of_replicas) + numberOfReplicas=num_of_replicas, + dataEngine=DATA_ENGINE) # Wait for the volume to detach and attach it to the test pod node volume = wait_for_volume_detached(client, volume_name) @@ -753,6 +762,7 @@ def assert_replica_count(is_stable=False): assert_replica_count(is_stable=True) +@pytest.mark.v2_volume_test # NOQA def test_replica_auto_balance_when_replica_on_unschedulable_node(client, core_api, volume_name, request): # NOQA """ Scenario: replica auto-balance when replica already running on @@ -806,7 +816,8 @@ def _set_and_wait_k8s_node_zone_label(): volume = client.create_volume(name=volume_name, numberOfReplicas=n_replicas, nodeSelector=["AVAIL"], - dataLocality="best-effort") + dataLocality="best-effort", + dataEngine=DATA_ENGINE) volume = wait_for_volume_detached(client, volume_name) volume.attach(hostId=get_self_host_id()) @@ -865,6 +876,7 @@ def finalizer(): time.sleep(RETRY_INTERVAL) +@pytest.mark.v2_volume_test # NOQA def test_replica_auto_balance_zone_best_effort_with_data_locality(client, core_api, volume_name, pod): # NOQA """ Background: @@ -1021,6 +1033,7 @@ def _set_and_wait_k8s_node_zone_label(): delete_and_wait_pod(core_api, pod['metadata']['name']) +@pytest.mark.v2_volume_test # NOQA def test_replica_auto_balance_node_duplicates_in_multiple_zones(client, core_api, volume_name): # NOQA """ Scenario: replica auto-balance to nodes with duplicated replicas in the @@ -1293,6 +1306,7 @@ def _set_and_wait_k8s_node_zone_label(): assert z2_r_count == 2 +@pytest.mark.v2_volume_test # NOQA def test_replica_auto_balance_should_respect_node_selector(client, core_api, volume_name, pod): # NOQA """ Background: @@ -1346,7 +1360,8 @@ def _set_and_wait_k8s_node_zone_label(): n_replicas = 3 client.create_volume(name=volume_name, numberOfReplicas=n_replicas, - nodeSelector=[node_tag]) + nodeSelector=[node_tag], + dataEngine=DATA_ENGINE) volume = wait_for_volume_detached(client, volume_name) volume.attach(hostId=selected_nodes[0].name)