From bba5403b2adc9ea8c5b66ef17146611ca7e65615 Mon Sep 17 00:00:00 2001 From: Mikhail Montsev Date: Wed, 13 Mar 2024 18:16:19 +0100 Subject: [PATCH] [Snapshot] delete qcow2_images/panic.img resource with tests where it was used (#727) --- build/ext_mapping.conf.json | 2 -- .../pkg/dataplane/url/tests/url_test.go | 6 ------ .../image_service_test/image_service_test.go | 12 ------------ .../internal/pkg/facade/testcommon/common.go | 17 ----------------- .../disk_manager/test/images/recipe/__main__.py | 11 ----------- .../disk_manager/test/images/resources/ya.make | 7 ------- 6 files changed, 55 deletions(-) diff --git a/build/ext_mapping.conf.json b/build/ext_mapping.conf.json index afba187648d..e14cb655a4c 100644 --- a/build/ext_mapping.conf.json +++ b/build/ext_mapping.conf.json @@ -12,7 +12,6 @@ "2513045473": "https://storage.nemax.nebius.cloud/nbs-oss-resources/flock", "2951476475": "https://storage.ai.nebius.cloud/nbs-oss-resources/ubuntu-18.04-minimal-cloudimg-amd64.img", "3064742393": "https://storage.ai.nebius.cloud/nbs-oss-resources/ubuntu1604-ci-stable", - "5274078903": "https://storage.ai.nebius.cloud/nbs-oss-resources/panic.img", "4709742882": "https://storage.ai.nebius.cloud/nbs-oss-resources/ubuntu-22.04-jammy-server-cloudimg-amd64.vmdk", "4915490540": "https://storage.ai.nebius.cloud/nbs-oss-resources/root.squashfs", "1268336763": "https://storage.ai.nebius.cloud/nbs-oss-resources/1268336763.rootfs.squashfs", @@ -32,7 +31,6 @@ "2513045473": "cloud/filestore/tools/testing/fs_posix_compliance/suite/bin", "2951476475": "cloud/disk_manager/internal/pkg/dataplane/url/qcow2/tests|cloud/disk_manager/internal/pkg/facade/image_service_test|cloud/disk_manager/internal/pkg/facade/image_service_nemesis_test", "3064742393": "cloud/disk_manager/internal/pkg/dataplane/url/qcow2/tests", - "5274078903": "cloud/disk_manager/internal/pkg/dataplane/url/tests|cloud/disk_manager/internal/pkg/facade/image_service_test|cloud/disk_manager/internal/pkg/facade/image_service_nemesis_test", "4709742882": "cloud/disk_manager/internal/pkg/dataplane/url/tests|cloud/disk_manager/internal/pkg/dataplane/url/vmdk/tests", "4915490540": "cloud/disk_manager/internal/pkg/facade/image_service_test|cloud/disk_manager/internal/pkg/facade/image_service_nemesis_test", "1268336763": "cloud/disk_manager/internal/pkg/logging/journald_tests", diff --git a/cloud/disk_manager/internal/pkg/dataplane/url/tests/url_test.go b/cloud/disk_manager/internal/pkg/dataplane/url/tests/url_test.go index 1d9adb05277..821aa463fcd 100644 --- a/cloud/disk_manager/internal/pkg/dataplane/url/tests/url_test.go +++ b/cloud/disk_manager/internal/pkg/dataplane/url/tests/url_test.go @@ -169,12 +169,6 @@ func TestImageReading(t *testing.T) { imageSize: parseUint64(t, os.Getenv("DISK_MANAGER_RECIPE_VMDK_UBUNTU2204_IMAGE_SIZE")), imageCRC32: parseUint32(t, os.Getenv("DISK_MANAGER_RECIPE_VMDK_UBUNTU2204_IMAGE_CRC32")), }, - { - name: "qcow2 image which reproduces panic issue (NBS-4635)", - imageURL: getImageFileURL(os.Getenv("DISK_MANAGER_RECIPE_QCOW2_PANIC_IMAGE_FILE_SERVER_PORT")), - imageSize: parseUint64(t, os.Getenv("DISK_MANAGER_RECIPE_QCOW2_PANIC_IMAGE_SIZE")), - imageCRC32: parseUint32(t, os.Getenv("DISK_MANAGER_RECIPE_QCOW2_PANIC_IMAGE_CRC32")), - }, { name: "vmdk stream optimized windows image with multiple grains", imageURL: getImageFileURL(os.Getenv("DISK_MANAGER_RECIPE_VMDK_WINDOWS_FILE_SERVER_PORT")), diff --git a/cloud/disk_manager/internal/pkg/facade/image_service_test/image_service_test.go b/cloud/disk_manager/internal/pkg/facade/image_service_test/image_service_test.go index bd519e3bf31..fb05c53b0e9 100644 --- a/cloud/disk_manager/internal/pkg/facade/image_service_test/image_service_test.go +++ b/cloud/disk_manager/internal/pkg/facade/image_service_test/image_service_test.go @@ -493,18 +493,6 @@ func TestImageServiceCreateGeneratedVMDKImageFromURL(t *testing.T) { //////////////////////////////////////////////////////////////////////////////// -// Reproduces panic issue (NBS-4635). -func TestImageServiceCreateQCOW2PanicImageFromURL(t *testing.T) { - testCreateImageFromURL( - t, - testcommon.GetQCOW2PanicImageFileURL(), - testcommon.GetQCOW2PanicImageSize(t), - testcommon.GetQCOW2PanicImageCrc32(t), - ) -} - -//////////////////////////////////////////////////////////////////////////////// - func TestImageServiceCancelCreateImageFromURL(t *testing.T) { ctx := testcommon.NewContext() diff --git a/cloud/disk_manager/internal/pkg/facade/testcommon/common.go b/cloud/disk_manager/internal/pkg/facade/testcommon/common.go index 2653bfa5734..4248a0d39eb 100644 --- a/cloud/disk_manager/internal/pkg/facade/testcommon/common.go +++ b/cloud/disk_manager/internal/pkg/facade/testcommon/common.go @@ -160,23 +160,6 @@ func GetGeneratedVMDKImageCrc32(t *testing.T) uint32 { return uint32(value) } -func GetQCOW2PanicImageFileURL() string { - port := os.Getenv("DISK_MANAGER_RECIPE_QCOW2_PANIC_IMAGE_FILE_SERVER_PORT") - return fmt.Sprintf("http://localhost:%v", port) -} - -func GetQCOW2PanicImageSize(t *testing.T) uint64 { - value, err := strconv.ParseUint(os.Getenv("DISK_MANAGER_RECIPE_QCOW2_PANIC_IMAGE_SIZE"), 10, 64) - require.NoError(t, err) - return uint64(value) -} - -func GetQCOW2PanicImageCrc32(t *testing.T) uint32 { - value, err := strconv.ParseUint(os.Getenv("DISK_MANAGER_RECIPE_QCOW2_PANIC_IMAGE_CRC32"), 10, 32) - require.NoError(t, err) - return uint32(value) -} - //////////////////////////////////////////////////////////////////////////////// func CancelOperation( diff --git a/cloud/disk_manager/test/images/recipe/__main__.py b/cloud/disk_manager/test/images/recipe/__main__.py index ba76d8c20f9..e8cba1d48e8 100644 --- a/cloud/disk_manager/test/images/recipe/__main__.py +++ b/cloud/disk_manager/test/images/recipe/__main__.py @@ -109,17 +109,6 @@ def start(argv): image_map_file_path = yatest_common.source_path("cloud/disk_manager/test/images/recipe/data/windows_vmdk_stream_optimised_multiple_grains_image_map.json") set_env("DISK_MANAGER_RECIPE_VMDK_WINDOWS_IMAGE_MAP_FILE", image_map_file_path) - # reproduces panic issue (NBS-4635) - qcow2_panic_image_file_path = yatest_common.build_path("cloud/disk_manager/test/images/resources/qcow2_images/panic.img") - if os.path.exists(qcow2_panic_image_file_path): - qcow2_panic_image_file_server = ImageFileServerLauncher(qcow2_panic_image_file_path) - qcow2_panic_image_file_server.start() - set_env("DISK_MANAGER_RECIPE_QCOW2_PANIC_IMAGE_FILE_SERVER_PORT", str(qcow2_panic_image_file_server.port)) - set_env("DISK_MANAGER_RECIPE_QCOW2_PANIC_IMAGE_FILE_SIZE", "7348420608") - # size and crc32 after converting to raw image - set_env("DISK_MANAGER_RECIPE_QCOW2_PANIC_IMAGE_SIZE", "21474836480") - set_env("DISK_MANAGER_RECIPE_QCOW2_PANIC_IMAGE_CRC32", "3101932729") - working_dir = get_unique_path_for_current_test( output_path=yatest_common.output_path(), sub_folder="" diff --git a/cloud/disk_manager/test/images/resources/ya.make b/cloud/disk_manager/test/images/resources/ya.make index b6cd6ca840d..115ad2968a2 100644 --- a/cloud/disk_manager/test/images/resources/ya.make +++ b/cloud/disk_manager/test/images/resources/ya.make @@ -14,13 +14,6 @@ FROM_SANDBOX( OUT_NOAUTO qcow2_images/ubuntu1604-ci-stable ) -FROM_SANDBOX( - FILE - 5274078903 - RENAME RESOURCE - OUT_NOAUTO qcow2_images/panic.img -) - FROM_SANDBOX( FILE 4709742882