Skip to content

Commit

Permalink
[Snapshot] delete qcow2_images/panic.img resource with tests where it…
Browse files Browse the repository at this point in the history
… was used (#727)
  • Loading branch information
SvartMetal authored and qkrorlqr committed Mar 14, 2024
1 parent 877ce2c commit bba5403
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 55 deletions.
2 changes: 0 additions & 2 deletions build/ext_mapping.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
17 changes: 0 additions & 17 deletions cloud/disk_manager/internal/pkg/facade/testcommon/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
11 changes: 0 additions & 11 deletions cloud/disk_manager/test/images/recipe/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down
7 changes: 0 additions & 7 deletions cloud/disk_manager/test/images/resources/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bba5403

Please sign in to comment.