From 8dfefcebeed7ddeebb6c7374169c8664ce523778 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Thu, 14 Jan 2021 12:15:45 -0800 Subject: [PATCH] Fix memory explosion in multi-store image tests For some reason, the MultiStoresImportImages test was causing the test runner to balloon to ~1.5G, which generates spurious OOMs in the gate, resulting in worker death and failure. This test was generating 10M of data with data_utils.random_bytes(), instead of the default of 1K, for no apparent reason. We are still not sure why, but this results in the memory ballooning, potentially because of BytesIO, or request.put() mishandling. Regardless, this is unnecessary, and causing failures in the gate, so this patch switches it back to the default, which works fine. Change-Id: I9f1ea0114531a735bd38ad54da7ce15fb2bf7f7c --- tempest/api/image/v2/test_images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tempest/api/image/v2/test_images.py b/tempest/api/image/v2/test_images.py index 9e25901891..d1f6f983d9 100644 --- a/tempest/api/image/v2/test_images.py +++ b/tempest/api/image/v2/test_images.py @@ -158,7 +158,7 @@ class MultiStoresImportImagesTest(base.BaseV2ImageTest): self.client.stage_image_file( image['id'], - six.BytesIO(data_utils.random_bytes(10485760))) + six.BytesIO(data_utils.random_bytes())) # Check image status is 'uploading' body = self.client.show_image(image['id']) self.assertEqual(image['id'], body['id'])