Fix neutron requests that are sent by background processes
Test test_ovsdb_transation sends several neutron port creation requests in parallel, using background processes. This failed when using SSL, an SSLError was raised: SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC In order to avoid that exception, this patch makes the background processes send their neutron requests using different keystone sessions. Change-Id: I91739e40fe4e27eb0280702f697bea36eb6685db
This commit is contained in:
parent
69bb4e65ae
commit
cfd7d864d4
|
@ -640,11 +640,16 @@ def check_port_created(port_count):
|
|||
|
||||
def create_multiple_port_network(port_count):
|
||||
# This function is run in threading mode
|
||||
session = keystone.get_keystone_session()
|
||||
session = keystone.get_keystone_session(shared=False)
|
||||
client = neutron.get_neutron_client(session=session)
|
||||
network = neutron.create_network(client=client, add_cleanup=False,
|
||||
name='tobiko_ovn_leader_test_network')
|
||||
for _ in range(port_count):
|
||||
# different clients are needed for the requests that are sent in
|
||||
# parallel processes running in background
|
||||
# with a common client, an SSLError exception is raised
|
||||
session = keystone.get_keystone_session(shared=False)
|
||||
client = neutron.get_neutron_client(session=session)
|
||||
# Multiple requests are sent in background mode to save time
|
||||
# and not to wait till the control returns
|
||||
sh.start_background_process(bg_function=neutron.create_port,
|
||||
|
|
Loading…
Reference in New Issue