From 8c8dad01877c795bec01dbb65de9532fc1f31a5a Mon Sep 17 00:00:00 2001 From: Maksim Malchuk Date: Wed, 7 Jun 2023 21:03:38 +0300 Subject: [PATCH] Fix Venus containers start issue The venus containers failed to start with an error (venus_api container): /usr/local/bin/kolla_start: line 24: exec: venus-api: not found because of [1] and also changes the encoding of the files form dos to unix introduced in [2]. 1. https://opendev.org/openstack/venus/src/branch/master/setup.cfg#L29-L30 2. If3562bbed6181002b76831bab54f863041c5a885 Change-Id: I8bee27882c15e39a3d2946787d56bc90db994887 Signed-off-by: Maksim Malchuk --- .../roles/venus/templates/venus-api.json.j2 | 38 +++++----- .../venus/templates/venus-manager.json.j2 | 38 +++++----- ansible/roles/venus/templates/venus.conf.j2 | 70 +++++++++---------- 3 files changed, 73 insertions(+), 73 deletions(-) diff --git a/ansible/roles/venus/templates/venus-api.json.j2 b/ansible/roles/venus/templates/venus-api.json.j2 index 8db87242d0..086b6dfd14 100644 --- a/ansible/roles/venus/templates/venus-api.json.j2 +++ b/ansible/roles/venus/templates/venus-api.json.j2 @@ -1,19 +1,19 @@ -{ - "command": "venus-api --config-file /etc/venus/venus.conf", - "config_files": [ - { - "source": "{{ container_config_directory }}/venus.conf", - "dest": "/etc/venus/venus.conf", - "owner": "venus", - "perm": "0644" - } - ], - "permissions": [ - { - "path":"/var/log/kolla/venus/venus-api.log", - "owner": "venus:venus", - "recurse": true - } - ] -} - +{ + "command": "venus_api --config-file /etc/venus/venus.conf", + "config_files": [ + { + "source": "{{ container_config_directory }}/venus.conf", + "dest": "/etc/venus/venus.conf", + "owner": "venus", + "perm": "0644" + } + ], + "permissions": [ + { + "path":"/var/log/kolla/venus/venus-api.log", + "owner": "venus:venus", + "recurse": true + } + ] +} + diff --git a/ansible/roles/venus/templates/venus-manager.json.j2 b/ansible/roles/venus/templates/venus-manager.json.j2 index 75439d6c6f..3a0ff07ea9 100644 --- a/ansible/roles/venus/templates/venus-manager.json.j2 +++ b/ansible/roles/venus/templates/venus-manager.json.j2 @@ -1,19 +1,19 @@ -{ - "command": "venus-manager --config-file /etc/venus/venus.conf task start", - "config_files": [ - { - "source": "{{ container_config_directory }}/venus.conf", - "dest": "/etc/venus/venus.conf", - "owner": "venus", - "perm": "0644" - } - ], - "permissions": [ - { - "path":"/var/log/kolla/venus/venus-manager.log", - "owner": "venus:venus", - "recurse": true - } - ] -} - +{ + "command": "venus_manager --config-file /etc/venus/venus.conf task start", + "config_files": [ + { + "source": "{{ container_config_directory }}/venus.conf", + "dest": "/etc/venus/venus.conf", + "owner": "venus", + "perm": "0644" + } + ], + "permissions": [ + { + "path":"/var/log/kolla/venus/venus-manager.log", + "owner": "venus:venus", + "recurse": true + } + ] +} + diff --git a/ansible/roles/venus/templates/venus.conf.j2 b/ansible/roles/venus/templates/venus.conf.j2 index 340759e46d..dbb80c415b 100644 --- a/ansible/roles/venus/templates/venus.conf.j2 +++ b/ansible/roles/venus/templates/venus.conf.j2 @@ -1,35 +1,35 @@ -[DEFAULT] -my_ip = {{ api_interface_address }} -periodic_interval = 60 -rootwrap_config = /etc/venus/rootwrap.conf -api_paste_config = /etc/venus/api-paste.ini -log_dir = /var/log/kolla/venus/ -debug = {{ venus_logging_debug }} -auth_strategy = keystone -os_region_name = {{ openstack_region_name }} -osapi_venus_listen = {{ api_interface_address }} -osapi_venus_listen_port = {{ venus_api_port }} - -logging_default_format_string = {{ openstack_logging_default_format_string }} -logging_context_format_string = {{ openstack_logging_context_format_string }} - -transport_url = {{ rpc_transport_url }} - -[database] -connection = mysql+pymysql://{{ venus_database_user }}:{{ venus_database_password }}@{{ venus_database_address }}/{{ venus_database_name }}?charset=utf8 - -[keystone_authtoken] -cafile = {{ openstack_cacert }} -project_name = service -password = {{ venus_keystone_password }} -username = {{ venus_keystone_user }} -auth_url = {{ keystone_internal_url }} -project_domain_id = {{ default_project_domain_id }} -user_domain_id = {{ default_user_domain_id }} -auth_type = password -memcached_servers = {% for host in groups['memcached'] %}{{ 'api' | kolla_address(host) | put_address_in_context('memcache') }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} - -{% if enable_opensearch | bool %} -[elasticsearch] -url = {{ opensearch_internal_endpoint }} -{% endif %} +[DEFAULT] +my_ip = {{ api_interface_address }} +periodic_interval = 60 +rootwrap_config = /etc/venus/rootwrap.conf +api_paste_config = /etc/venus/api-paste.ini +log_dir = /var/log/kolla/venus/ +debug = {{ venus_logging_debug }} +auth_strategy = keystone +os_region_name = {{ openstack_region_name }} +osapi_venus_listen = {{ api_interface_address }} +osapi_venus_listen_port = {{ venus_api_port }} + +logging_default_format_string = {{ openstack_logging_default_format_string }} +logging_context_format_string = {{ openstack_logging_context_format_string }} + +transport_url = {{ rpc_transport_url }} + +[database] +connection = mysql+pymysql://{{ venus_database_user }}:{{ venus_database_password }}@{{ venus_database_address }}/{{ venus_database_name }}?charset=utf8 + +[keystone_authtoken] +cafile = {{ openstack_cacert }} +project_name = service +password = {{ venus_keystone_password }} +username = {{ venus_keystone_user }} +auth_url = {{ keystone_internal_url }} +project_domain_id = {{ default_project_domain_id }} +user_domain_id = {{ default_user_domain_id }} +auth_type = password +memcached_servers = {% for host in groups['memcached'] %}{{ 'api' | kolla_address(host) | put_address_in_context('memcache') }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %} + +{% if enable_opensearch | bool %} +[elasticsearch] +url = {{ opensearch_internal_endpoint }} +{% endif %}