Use concurrent.futures instead of multiprocessing

On the environment with enabled SSL the SSLv3_ALERT_BAD_RECORD_MAC error
occurs in fio_setup/fio_cleanup modules, in the section where processes
of creating/deleting VMs are paralleled.
This is due the paralleled processes have to communicate with each other
about the state of the shared SSL connection.
Changing to multithreading resolves the issues.

Related-PROD: #PROD-37187
Change-Id: I4f15ef900c79811db0d807ae2c91779595f497d2
diff --git a/fio/fio_cleanup.py b/fio/fio_cleanup.py
index 715e01d..c6ddd05 100644
--- a/fio/fio_cleanup.py
+++ b/fio/fio_cleanup.py
@@ -1,4 +1,4 @@
-import multiprocessing as mp
+import concurrent.futures as cex
 
 import connection as conn
 from openstack.exceptions import ResourceFailure
@@ -51,10 +51,10 @@
     vms = list(compute.servers(name=CLIENT_NAME_MASK, details=False))
 
     # Delete fio VMs in parallel in batches of CONCURRENCY size
-    with mp.Pool(processes=CONCURRENCY) as pool:
-        results = [pool.apply_async(delete_fio_client, (vm.id,)) for vm in vms]
+    with cex.ThreadPoolExecutor(max_workers=CONCURRENCY) as executor:
+        futures = [executor.submit(delete_fio_client, vm.id) for vm in vms]
         # Waits for batch of fio VMs to be deleted
-        _ = [r.get() for r in results]
+        _ = [future.result() for future in futures]
 
     # Remove ports from fio router (including external GW)
     router = network.find_router(ROUTER_NAME)
diff --git a/fio/fio_setup.py b/fio/fio_setup.py
index b788b1c..ab4502d 100644
--- a/fio/fio_setup.py
+++ b/fio/fio_setup.py
@@ -1,5 +1,5 @@
 import base64
-import multiprocessing as mp
+import concurrent.futures as cex
 import os
 import random
 import sys
@@ -224,9 +224,7 @@
         user_data=udata)
 
     # Create fio client VMs in parallel in batches of CONCURRENCY size
-    with mp.Pool(processes=CONCURRENCY) as pool:
-        results = [
-            pool.apply_async(create_fio_client, kwds=vm_kwargs)
-            for _ in range(CLIENTS_COUNT)]
+    with cex.ThreadPoolExecutor(max_workers=CONCURRENCY) as executor:
+        futures = [executor.submit(create_fio_client, **vm_kwargs) for _ in range(CLIENTS_COUNT)]
         # Wait for batch of fio client VMs to be created
-        _ = [r.get() for r in results]
+        _ = [future.result() for future in futures]