diff --git a/ansible/roles/trove/tasks/config.yml b/ansible/roles/trove/tasks/config.yml index be29058e0b..1bbe2f24e6 100644 --- a/ansible/roles/trove/tasks/config.yml +++ b/ansible/roles/trove/tasks/config.yml @@ -48,29 +48,6 @@ notify: - "Restart {{ item.key }} container" -- name: Copying over trove conf files - vars: - services_need_confs: - - trove-conductor - - trove-taskmanager - merge_configs: - sources: - - "{{ role_path }}/templates/{{ item.key }}.conf.j2" - - "{{ node_custom_config }}/global.conf" - - "{{ node_custom_config }}/{{ item.key }}.conf" - - "{{ node_custom_config }}/trove/{{ item.key }}.conf" - - "{{ node_custom_config }}/trove/{{ inventory_hostname }}/{{ item.key }}.conf" - dest: "{{ node_config_directory }}/{{ item.key }}/{{ item.key }}.conf" - mode: "0660" - become: true - when: - - item.key in services_need_confs - - inventory_hostname in groups[item.value.group] - - item.value.enabled | bool - with_dict: "{{ trove_services }}" - notify: - - "Restart {{ item.key }} container" - - name: Copying over trove-guestagent.conf vars: services_need_confs: diff --git a/ansible/roles/trove/templates/trove-conductor.conf.j2 b/ansible/roles/trove/templates/trove-conductor.conf.j2 deleted file mode 100644 index 6aaf468563..0000000000 --- a/ansible/roles/trove/templates/trove-conductor.conf.j2 +++ /dev/null @@ -1,46 +0,0 @@ -[DEFAULT] -debug = {{ trove_logging_debug }} - -log_dir = /var/log/kolla/trove -conductor_manager = trove.conductor.manager.Manager -control_exchange = trove - -transport_url = {{ rpc_transport_url }} - -[service_credentials] -auth_url = {{ keystone_internal_url }}/v3 -region_name = {{ openstack_region_name }} -project_name = service -password = {{ trove_keystone_password }} -project_domain_name = {{ default_project_domain_name }} -user_domain_name = {{ default_user_domain_name }} -username = {{ trove_keystone_user }} - -[oslo_messaging_notifications] -transport_url = {{ notify_transport_url }} -{% if trove_enabled_notification_topics %} -driver = messagingv2 -topics = {{ trove_enabled_notification_topics | map(attribute='name') | join(',') }} -{% else %} -driver = noop -{% endif %} - -{% if om_enable_rabbitmq_tls | bool %} -[oslo_messaging_rabbit] -ssl = true -ssl_ca_file = {{ om_rabbitmq_cacert }} -{% endif %} - -[database] -connection = mysql+pymysql://{{ trove_database_user }}:{{ trove_database_password }}@{{ trove_database_address }}/{{ trove_database_name }} -connection_recycle_time = {{ database_connection_recycle_time }} -max_pool_size = {{ database_max_pool_size }} -max_retries = -1 - -{% if enable_osprofiler | bool %} -[profiler] -enabled = true -trace_sqlalchemy = true -hmac_keys = {{ osprofiler_secret }} -connection_string = {{ osprofiler_backend_connection_string }} -{% endif %} diff --git a/ansible/roles/trove/templates/trove-conductor.json.j2 b/ansible/roles/trove/templates/trove-conductor.json.j2 index e6ae59c0da..12d884a5d0 100644 --- a/ansible/roles/trove/templates/trove-conductor.json.j2 +++ b/ansible/roles/trove/templates/trove-conductor.json.j2 @@ -1,9 +1,9 @@ { - "command": "trove-conductor --config-file=/etc/trove/trove-conductor.conf", + "command": "trove-conductor --config-file=/etc/trove/trove.conf", "config_files": [ { - "source": "{{ container_config_directory }}/trove-conductor.conf", - "dest": "/etc/trove/trove-conductor.conf", + "source": "{{ container_config_directory }}/trove.conf", + "dest": "/etc/trove/trove.conf", "owner": "trove", "perm": "0600" }{% if trove_policy_file is defined %}, diff --git a/ansible/roles/trove/templates/trove-taskmanager.conf.j2 b/ansible/roles/trove/templates/trove-taskmanager.conf.j2 deleted file mode 100644 index c578bbf8ec..0000000000 --- a/ansible/roles/trove/templates/trove-taskmanager.conf.j2 +++ /dev/null @@ -1,63 +0,0 @@ -[DEFAULT] -debug = {{ trove_logging_debug }} - -log_dir = /var/log/kolla/trove - -{% if enable_trove_singletenant | bool %} -nova_proxy_admin_pass = {{ trove_keystone_password }} -nova_proxy_admin_tenant_name = service -nova_proxy_admin_user = trove -remote_nova_client = trove.common.single_tenant_remote.nova_client_trove_admin -remote_cinder_client = trove.common.single_tenant_remote.cinder_client_trove_admin -remote_neutron_client = trove.common.single_tenant_remote.neutron_client_trove_admin -{% endif %} -taskmanager_manager = trove.taskmanager.manager.Manager - -transport_url = {{ rpc_transport_url }} - -nova_compute_endpoint_type = internalURL -neutron_endpoint_type = internalURL -cinder_endpoint_type = internalURL -swift_endpoint_type = internalURL -glance_endpoint_type = internalURL -trove_endpoint_type = internalURL - -network_driver = trove.network.neutron.NeutronDriver - -[service_credentials] -auth_url = {{ keystone_internal_url }}/v3 -region_name = {{ openstack_region_name }} -project_name = service -password = {{ trove_keystone_password }} -project_domain_name = {{ default_project_domain_name }} -user_domain_name = {{ default_user_domain_name }} -username = {{ trove_keystone_user }} - -[database] -connection = mysql+pymysql://{{ trove_database_user }}:{{ trove_database_password }}@{{ trove_database_address }}/{{ trove_database_name }} -connection_recycle_time = {{ database_connection_recycle_time }} -max_pool_size = {{ database_max_pool_size }} -max_retries = -1 - -[oslo_messaging_notifications] -transport_url = {{ notify_transport_url }} -{% if trove_enabled_notification_topics %} -driver = messagingv2 -topics = {{ trove_enabled_notification_topics | map(attribute='name') | join(',') }} -{% else %} -driver = noop -{% endif %} - -{% if om_enable_rabbitmq_tls | bool %} -[oslo_messaging_rabbit] -ssl = true -ssl_ca_file = {{ om_rabbitmq_cacert }} -{% endif %} - -{% if enable_osprofiler | bool %} -[profiler] -enabled = true -trace_sqlalchemy = true -hmac_keys = {{ osprofiler_secret }} -connection_string = {{ osprofiler_backend_connection_string }} -{% endif %} diff --git a/ansible/roles/trove/templates/trove-taskmanager.json.j2 b/ansible/roles/trove/templates/trove-taskmanager.json.j2 index a9c86ab448..7298de345f 100644 --- a/ansible/roles/trove/templates/trove-taskmanager.json.j2 +++ b/ansible/roles/trove/templates/trove-taskmanager.json.j2 @@ -1,9 +1,9 @@ { - "command": "trove-taskmanager --config-file=/etc/trove/trove-taskmanager.conf", + "command": "trove-taskmanager --config-file=/etc/trove/trove.conf", "config_files": [ { - "source": "{{ container_config_directory }}/trove-taskmanager.conf", - "dest": "/etc/trove/trove-taskmanager.conf", + "source": "{{ container_config_directory }}/trove.conf", + "dest": "/etc/trove/trove.conf", "owner": "trove", "perm": "0600" }, diff --git a/ansible/roles/trove/templates/trove.conf.j2 b/ansible/roles/trove/templates/trove.conf.j2 index e642ed2687..4c1232cc2a 100644 --- a/ansible/roles/trove/templates/trove.conf.j2 +++ b/ansible/roles/trove/templates/trove.conf.j2 @@ -12,6 +12,15 @@ auth_strategy = keystone transport_url = {{ rpc_transport_url }} +{% if enable_trove_singletenant | bool %} +nova_proxy_admin_pass = {{ trove_keystone_password }} +nova_proxy_admin_tenant_name = service +nova_proxy_admin_user = trove +remote_nova_client = trove.common.single_tenant_remote.nova_client_trove_admin +remote_cinder_client = trove.common.single_tenant_remote.cinder_client_trove_admin +remote_neutron_client = trove.common.single_tenant_remote.neutron_client_trove_admin +{% endif %} + nova_compute_endpoint_type = internalURL neutron_endpoint_type = internalURL cinder_endpoint_type = internalURL @@ -19,8 +28,12 @@ swift_endpoint_type = internalURL glance_endpoint_type = internalURL trove_endpoint_type = internalURL +taskmanager_manager = trove.taskmanager.manager.Manager +conductor_manager = trove.conductor.manager.Manager network_driver = trove.network.neutron.NeutronDriver +control_exchange = trove + [service_credentials] auth_url = {{ keystone_internal_url }}/v3 region_name = {{ openstack_region_name }} @@ -34,6 +47,7 @@ username = {{ trove_keystone_user }} connection = mysql+pymysql://{{ trove_database_user }}:{{ trove_database_password }}@{{ trove_database_address }}/{{ trove_database_name }} connection_recycle_time = {{ database_connection_recycle_time }} max_pool_size = {{ database_max_pool_size }} +max_retries = -1 [keystone_authtoken] www_authenticate_uri = {{ keystone_internal_url }} diff --git a/releasenotes/notes/combine_trove_config_files-ff3d37440a472a82.yaml b/releasenotes/notes/combine_trove_config_files-ff3d37440a472a82.yaml new file mode 100644 index 0000000000..9124992753 --- /dev/null +++ b/releasenotes/notes/combine_trove_config_files-ff3d37440a472a82.yaml @@ -0,0 +1,12 @@ +--- +upgrade: + - | + Combine ``trove-taskmanager.conf`` and ``trove-conductor.conf`` + to ``trove.conf``. you should move all customized opts in + ``/etc/kolla/config/trove/trove-taskmanager.conf`` or + ``/etc/kolla/config/trove/trove-conductor.conf`` to + ``/etc/kolla/config/trove/trove.conf`` +deprecations: + - | + ``trove-taskmanager.conf`` and ``trove-conductor.conf`` are + deprecated in wallaby