tripleo-common/tripleo_common/tests/image
Alex Schultz 60afc0eec4 Make executor type dynamic
When we run the tripleo-container-image-prepare script, it performs
better under python2 when the process leverages a ProcessPoolExecutor.
Rather than using threading, we should be using processes to handle the
image upload processing. Currently when we're processing the images, we
end up being single threaded due to the GIL when processing the data. By
switching to the ProcessPoolExecutor, we eliminate the locking that is
occuring during the data processing as it'll be handled in each process.

Unfortunately, we cannot leverage the ProcessPoolExecutor when the same
code is run under Mistral. In order to make the code work for both
methods, we need to make the execution type dynamic. This change creates
two types of lock objects that are used to determine what type of
executor to ultimately use when processing the images for uploading.

Additionally this change limits the number of concurrent image upload
processes to 4 if using the ProcessPoolExecutor and caps the number of
threads at a max of 8 based on (cpu count / 2)

Change-Id: I60507eba9884a0660fe269da5ad27b0e57a70ca8
Related-Bug: #1844446
2019-10-08 08:25:21 -06:00
..
builder Ensure we're raising proper exceptions 2019-07-15 08:41:16 -05:00
__init__.py Build image files from definitions in yaml 2016-03-18 11:43:32 -04:00
fakes.py Break out function get_undercloud_registry 2018-04-05 21:03:57 +00:00
test_base.py Replaces yaml.load() with yaml.safe_load() 2017-03-10 01:16:49 +00:00
test_build.py Set imageext for IPA ramdisk 2017-01-17 00:18:18 +00:00
test_image_builder.py Open log in utf-8 to prevent UnicodeEncodeError 2017-02-16 17:16:25 +00:00
test_image_export.py Log exceptions when checking status 2019-08-22 09:50:27 -06:00
test_image_uploader.py Make executor type dynamic 2019-10-08 08:25:21 -06:00
test_kolla_builder.py Make executor type dynamic 2019-10-08 08:25:21 -06:00