From 2523ab4376ee82fb0875368236638d5c8e668c5e Mon Sep 17 00:00:00 2001 From: Michal Arbet Date: Mon, 2 Sep 2024 19:05:21 +0200 Subject: [PATCH] Ensure consistent lock_path across all services This patch removes the conditional check `om_enable_queue_manager` for `oslo_concurrency` as it was inconsistently applied across services and is actually unrelated to the queue manager. Simply said somewhere the conditional was present and somewhere it wasn't. While `oslo.concurrency` itself does not require a specific path, the implementation of the queue manager expects locks to be placed under `/var/lib//tmp`, making it necessary to define this path explicitly. Therefore, the lock path is set accordingly across all services, regardless of whether the queue manager is used. Additionally, this patch adds missing `lock_path` configurations where they were absent to ensure uniformity. Change-Id: I93bbaa61b2d8b5cb0d1a11783086b37a860173b6 --- ansible/roles/aodh/templates/aodh.conf.j2 | 2 -- ansible/roles/barbican/templates/barbican.conf.j2 | 2 -- ansible/roles/blazar/templates/blazar.conf.j2 | 2 -- ansible/roles/ceilometer/templates/ceilometer.conf.j2 | 2 -- ansible/roles/cyborg/templates/cyborg.conf.j2 | 2 -- ansible/roles/glance/templates/glance-cache.conf.j2 | 3 +++ ansible/roles/gnocchi/templates/gnocchi.conf.j2 | 3 +++ ansible/roles/heat/templates/heat.conf.j2 | 2 -- ansible/roles/ironic/templates/ironic-inspector.conf.j2 | 3 +++ ansible/roles/ironic/templates/ironic.conf.j2 | 2 -- ansible/roles/keystone/templates/keystone.conf.j2 | 2 -- ansible/roles/kuryr/templates/kuryr.conf.j2 | 3 +++ ansible/roles/manila/templates/manila-share.conf.j2 | 3 +++ ansible/roles/masakari/templates/masakari-monitors.conf.j2 | 3 +++ ansible/roles/masakari/templates/masakari.conf.j2 | 2 -- ansible/roles/mistral/templates/mistral.conf.j2 | 2 -- ansible/roles/nova-cell/templates/nova.conf.j2 | 1 - ansible/roles/octavia/templates/octavia.conf.j2 | 2 -- ansible/roles/tacker/templates/tacker.conf.j2 | 2 -- ansible/roles/trove/templates/trove-guestagent.conf.j2 | 3 +++ ansible/roles/trove/templates/trove.conf.j2 | 2 -- ansible/roles/venus/templates/venus.conf.j2 | 2 -- 22 files changed, 21 insertions(+), 29 deletions(-) diff --git a/ansible/roles/aodh/templates/aodh.conf.j2 b/ansible/roles/aodh/templates/aodh.conf.j2 index 5ed56d9eea..3664309f17 100644 --- a/ansible/roles/aodh/templates/aodh.conf.j2 +++ b/ansible/roles/aodh/templates/aodh.conf.j2 @@ -73,7 +73,5 @@ amqp_durable_queues = true rabbit_quorum_queue = true {% endif %} -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/aodh/tmp -{% endif %} diff --git a/ansible/roles/barbican/templates/barbican.conf.j2 b/ansible/roles/barbican/templates/barbican.conf.j2 index 63df7a89fc..afc5b98a8b 100644 --- a/ansible/roles/barbican/templates/barbican.conf.j2 +++ b/ansible/roles/barbican/templates/barbican.conf.j2 @@ -104,7 +104,5 @@ enable_proxy_headers_parsing = True policy_file = {{ barbican_policy_file }} {% endif %} -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/barbican/tmp -{% endif %} diff --git a/ansible/roles/blazar/templates/blazar.conf.j2 b/ansible/roles/blazar/templates/blazar.conf.j2 index 13ab3e8bd4..b2ce275775 100644 --- a/ansible/roles/blazar/templates/blazar.conf.j2 +++ b/ansible/roles/blazar/templates/blazar.conf.j2 @@ -72,7 +72,5 @@ rabbit_quorum_queue = true policy_file = {{ blazar_policy_file }} {% endif %} -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/blazar/tmp -{% endif %} diff --git a/ansible/roles/ceilometer/templates/ceilometer.conf.j2 b/ansible/roles/ceilometer/templates/ceilometer.conf.j2 index f34f703591..404afc7ae3 100644 --- a/ansible/roles/ceilometer/templates/ceilometer.conf.j2 +++ b/ansible/roles/ceilometer/templates/ceilometer.conf.j2 @@ -58,7 +58,5 @@ backend = oslo_cache.memcache_pool enabled = True memcache_servers = {% for host in groups['memcached'] %}{{ 'api' | kolla_address(host) | put_address_in_context('memcache') }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/ceilometer/tmp -{% endif %} diff --git a/ansible/roles/cyborg/templates/cyborg.conf.j2 b/ansible/roles/cyborg/templates/cyborg.conf.j2 index 8564b3feb5..ba00d270d2 100644 --- a/ansible/roles/cyborg/templates/cyborg.conf.j2 +++ b/ansible/roles/cyborg/templates/cyborg.conf.j2 @@ -82,7 +82,5 @@ amqp_durable_queues = true rabbit_quorum_queue = true {% endif %} -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/cyborg/tmp -{% endif %} diff --git a/ansible/roles/glance/templates/glance-cache.conf.j2 b/ansible/roles/glance/templates/glance-cache.conf.j2 index 9ff0f6efc6..4fc6400ca5 100644 --- a/ansible/roles/glance/templates/glance-cache.conf.j2 +++ b/ansible/roles/glance/templates/glance-cache.conf.j2 @@ -14,3 +14,6 @@ admin_tenant_name = {{ default_project_domain_id }} {% if glance_backend_file | bool %} filesystem_store_datadir = /var/lib/glance/images/ {% endif %} + +[oslo_concurrency] +lock_path = /var/lib/glance/tmp diff --git a/ansible/roles/gnocchi/templates/gnocchi.conf.j2 b/ansible/roles/gnocchi/templates/gnocchi.conf.j2 index 6a218bac1d..fab81554e2 100644 --- a/ansible/roles/gnocchi/templates/gnocchi.conf.j2 +++ b/ansible/roles/gnocchi/templates/gnocchi.conf.j2 @@ -98,3 +98,6 @@ swift_project_name = {{ swift_admin_tenant_name }} [cors] allowed_origin = {{ grafana_public_endpoint }} {% endif %} + +[oslo_concurrency] +lock_path = /var/lib/gnocchi/tmp diff --git a/ansible/roles/heat/templates/heat.conf.j2 b/ansible/roles/heat/templates/heat.conf.j2 index e9fb6fabf0..0bf5e331c4 100644 --- a/ansible/roles/heat/templates/heat.conf.j2 +++ b/ansible/roles/heat/templates/heat.conf.j2 @@ -107,7 +107,5 @@ connection_string = {{ osprofiler_backend_connection_string }} [volumes] backups_enabled = {{ enable_cinder_backup | bool }} -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/heat/tmp -{% endif %} diff --git a/ansible/roles/ironic/templates/ironic-inspector.conf.j2 b/ansible/roles/ironic/templates/ironic-inspector.conf.j2 index 5438864366..16744250f4 100644 --- a/ansible/roles/ironic/templates/ironic-inspector.conf.j2 +++ b/ansible/roles/ironic/templates/ironic-inspector.conf.j2 @@ -97,3 +97,6 @@ backend_url = etcd3+{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ etcd_ [accelerators] known_devices = /etc/ironic-inspector/known_devices.yaml {% endif %} + +[oslo_concurrency] +lock_path = /var/lib/ironic/tmp diff --git a/ansible/roles/ironic/templates/ironic.conf.j2 b/ansible/roles/ironic/templates/ironic.conf.j2 index e9399649d5..159e1a8750 100644 --- a/ansible/roles/ironic/templates/ironic.conf.j2 +++ b/ansible/roles/ironic/templates/ironic.conf.j2 @@ -219,7 +219,5 @@ enable_proxy_headers_parsing = True dhcp_provider = none {% endif %} -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/ironic/tmp -{% endif %} diff --git a/ansible/roles/keystone/templates/keystone.conf.j2 b/ansible/roles/keystone/templates/keystone.conf.j2 index db8d460d3a..b418e4e568 100644 --- a/ansible/roles/keystone/templates/keystone.conf.j2 +++ b/ansible/roles/keystone/templates/keystone.conf.j2 @@ -100,7 +100,5 @@ remote_id_attribute = {{ keystone_remote_id_attribute_oidc }} methods = password,token,openid,application_credential {% endif %} -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/keystone/tmp -{% endif %} diff --git a/ansible/roles/kuryr/templates/kuryr.conf.j2 b/ansible/roles/kuryr/templates/kuryr.conf.j2 index 2db4ae9579..00c8784bbb 100644 --- a/ansible/roles/kuryr/templates/kuryr.conf.j2 +++ b/ansible/roles/kuryr/templates/kuryr.conf.j2 @@ -27,3 +27,6 @@ cafile = {{ openstack_cacert }} [oslo_policy] policy_file = {{ kuryr_policy_file }} {% endif %} + +[oslo_concurrency] +lock_path = /var/lib/kuryr/tmp diff --git a/ansible/roles/manila/templates/manila-share.conf.j2 b/ansible/roles/manila/templates/manila-share.conf.j2 index 98cb78b4e6..2a4a48f364 100644 --- a/ansible/roles/manila/templates/manila-share.conf.j2 +++ b/ansible/roles/manila/templates/manila-share.conf.j2 @@ -161,3 +161,6 @@ glusterfs_servers = {% for ip in manila_glusterfs_servers %}{% if manila_gluster {% if manila_glusterfs_ssh_password is defined %}glusterfs_server_password = {{ manila_glusterfs_ssh_password }}{% endif %} {% endif %} + +[oslo_concurrency] +lock_path = /var/lib/manila/tmp diff --git a/ansible/roles/masakari/templates/masakari-monitors.conf.j2 b/ansible/roles/masakari/templates/masakari-monitors.conf.j2 index 016fb8d4c9..7a4f573928 100644 --- a/ansible/roles/masakari/templates/masakari-monitors.conf.j2 +++ b/ansible/roles/masakari/templates/masakari-monitors.conf.j2 @@ -41,3 +41,6 @@ corosync_multicast_ports = {{ hacluster_corosync_port }} pacemaker_node_type = remote {% endif %} {% endif %} + +[oslo_concurrency] +lock_path = /var/lib/masakari/tmp diff --git a/ansible/roles/masakari/templates/masakari.conf.j2 b/ansible/roles/masakari/templates/masakari.conf.j2 index 0b38cf9282..03c6ac695b 100644 --- a/ansible/roles/masakari/templates/masakari.conf.j2 +++ b/ansible/roles/masakari/templates/masakari.conf.j2 @@ -85,7 +85,5 @@ backend_url = etcd3+{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ etcd_ {% endif %} {% endif %} -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/masakari/tmp -{% endif %} diff --git a/ansible/roles/mistral/templates/mistral.conf.j2 b/ansible/roles/mistral/templates/mistral.conf.j2 index 4ef6e5514e..600e921a57 100644 --- a/ansible/roles/mistral/templates/mistral.conf.j2 +++ b/ansible/roles/mistral/templates/mistral.conf.j2 @@ -101,7 +101,5 @@ connection_string = {{ osprofiler_backend_connection_string }} [coordination] backend_url = {{ redis_connection_string }} -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/mistral/tmp -{% endif %} diff --git a/ansible/roles/nova-cell/templates/nova.conf.j2 b/ansible/roles/nova-cell/templates/nova.conf.j2 index 47f3d1e21e..8aedbd7ea7 100644 --- a/ansible/roles/nova-cell/templates/nova.conf.j2 +++ b/ansible/roles/nova-cell/templates/nova.conf.j2 @@ -98,7 +98,6 @@ project_domain_name = {{ default_project_domain_name }} endpoint_override = {{ ironic_internal_endpoint }}/v1 {% endif %} - [oslo_concurrency] lock_path = /var/lib/nova/tmp diff --git a/ansible/roles/octavia/templates/octavia.conf.j2 b/ansible/roles/octavia/templates/octavia.conf.j2 index be662a863e..074d1d1f59 100644 --- a/ansible/roles/octavia/templates/octavia.conf.j2 +++ b/ansible/roles/octavia/templates/octavia.conf.j2 @@ -164,7 +164,5 @@ jobboard_backend_port = "{{ redis_port }}" jobboard_backend_hosts = {% for host in groups['redis'] %}{{ 'api' | kolla_address(host) | put_address_in_context('url') }}{% if not loop.last %},{% endif %}{% endfor %} {% endif %} -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/octavia/tmp -{% endif %} diff --git a/ansible/roles/tacker/templates/tacker.conf.j2 b/ansible/roles/tacker/templates/tacker.conf.j2 index 33719e1106..5dfad235f0 100644 --- a/ansible/roles/tacker/templates/tacker.conf.j2 +++ b/ansible/roles/tacker/templates/tacker.conf.j2 @@ -89,7 +89,5 @@ policy_file = {{ tacker_policy_file }} [glance_store] filesystem_store_datadir = /var/lib/tacker/csar_files -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/tacker/tmp -{% endif %} diff --git a/ansible/roles/trove/templates/trove-guestagent.conf.j2 b/ansible/roles/trove/templates/trove-guestagent.conf.j2 index 112b22f7d4..64d4a636da 100644 --- a/ansible/roles/trove/templates/trove-guestagent.conf.j2 +++ b/ansible/roles/trove/templates/trove-guestagent.conf.j2 @@ -24,3 +24,6 @@ amqp_durable_queues = true {% if om_enable_rabbitmq_quorum_queues | bool %} rabbit_quorum_queue = true {% endif %} + +[oslo_concurrency] +lock_path = /var/lib/trove/tmp diff --git a/ansible/roles/trove/templates/trove.conf.j2 b/ansible/roles/trove/templates/trove.conf.j2 index 3a5f74d6bd..6dd3b72f03 100644 --- a/ansible/roles/trove/templates/trove.conf.j2 +++ b/ansible/roles/trove/templates/trove.conf.j2 @@ -100,7 +100,5 @@ connection_string = {{ osprofiler_backend_connection_string }} policy_file = {{ trove_policy_file }} {% endif %} -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/trove/tmp -{% endif %} diff --git a/ansible/roles/venus/templates/venus.conf.j2 b/ansible/roles/venus/templates/venus.conf.j2 index 6ba6381690..f4dc0b77e7 100644 --- a/ansible/roles/venus/templates/venus.conf.j2 +++ b/ansible/roles/venus/templates/venus.conf.j2 @@ -34,7 +34,5 @@ memcached_servers = {% for host in groups['memcached'] %}{{ 'api' | kolla_addres url = {{ opensearch_internal_endpoint }} {% endif %} -{% if om_enable_queue_manager | bool %} [oslo_concurrency] lock_path = /var/lib/venus/tmp -{% endif %}