Use default thread locking for container image prepare
Process based locking was added to improve container prepare
performance for python2/mistral, according to this change[1] so it
might not be appropriate to use it in an ansible module.
This change removes the ProcessLock so the image preparation uses the
default ThreadLock (and the thread executor).
It is possible that authentication caching doesn't work at all with
the process based executor, and support for that executor should be
removed entirely now that it is not required.
[1]60afc0eec4
Resolves: rhbz#2165527
Change-Id: Ib127b11cc26944dc4c348d7c8b6938bbea0a134a
This commit is contained in:
parent
9256ab0a86
commit
568e88435f
@ -27,7 +27,6 @@ from ansible_collections.openstack.cloud.plugins.module_utils.openstack import o
|
|||||||
from tripleo_common import constants
|
from tripleo_common import constants
|
||||||
from tripleo_common.image import image_uploader
|
from tripleo_common.image import image_uploader
|
||||||
from tripleo_common.image import kolla_builder
|
from tripleo_common.image import kolla_builder
|
||||||
from tripleo_common.utils.locks import processlock
|
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.1',
|
'metadata_version': '1.1',
|
||||||
@ -144,10 +143,8 @@ def run_module():
|
|||||||
roles_data = module.params.get('roles_data')
|
roles_data = module.params.get('roles_data')
|
||||||
env = module.params.get('environment')
|
env = module.params.get('environment')
|
||||||
try:
|
try:
|
||||||
lock = processlock.ProcessLock()
|
|
||||||
params = kolla_builder.container_images_prepare_multi(
|
params = kolla_builder.container_images_prepare_multi(
|
||||||
env, roles_data, cleanup=cleanup, dry_run=dry_run,
|
env, roles_data, cleanup=cleanup, dry_run=dry_run)
|
||||||
lock=lock)
|
|
||||||
|
|
||||||
for role in roles_data:
|
for role in roles_data:
|
||||||
# NOTE(tkajinam): If a role-specific container image prepare
|
# NOTE(tkajinam): If a role-specific container image prepare
|
||||||
@ -164,8 +161,7 @@ def run_module():
|
|||||||
# parameters
|
# parameters
|
||||||
params['%sParameters' % role['name']] = (
|
params['%sParameters' % role['name']] = (
|
||||||
kolla_builder.container_images_prepare_multi(
|
kolla_builder.container_images_prepare_multi(
|
||||||
tmp_env, [role], cleanup=cleanup, dry_run=dry_run,
|
tmp_env, [role], cleanup=cleanup, dry_run=dry_run)
|
||||||
lock=lock)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if not module.no_log:
|
if not module.no_log:
|
||||||
|
Loading…
Reference in New Issue
Block a user