diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index ed80001a05..6f85ab5a35 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -229,7 +229,10 @@ glance_external_fqdn: "{{ kolla_external_fqdn }}" glance_api_port: "9292" glance_api_listen_port: "{{ glance_api_port }}" +gnocchi_internal_fqdn: "{{ kolla_internal_fqdn }}" +gnocchi_external_fqdn: "{{ kolla_external_fqdn }}" gnocchi_api_port: "8041" +gnocchi_api_listen_port: "{{ gnocchi_api_port }}" grafana_server_port: "3000" diff --git a/ansible/roles/gnocchi/defaults/main.yml b/ansible/roles/gnocchi/defaults/main.yml index 79e4530912..ba4124e527 100644 --- a/ansible/roles/gnocchi/defaults/main.yml +++ b/ansible/roles/gnocchi/defaults/main.yml @@ -18,12 +18,12 @@ gnocchi_services: enabled: "{{ enable_gnocchi }}" mode: "http" external: false - port: "{{ gnocchi_api_port }}" + port: "{{ gnocchi_api_listen_port }}" gnocchi_api_external: enabled: "{{ enable_gnocchi }}" mode: "http" external: true - port: "{{ gnocchi_api_port }}" + port: "{{ gnocchi_api_listen_port }}" gnocchi-metricd: container_name: gnocchi_metricd group: gnocchi-metricd @@ -110,9 +110,9 @@ gnocchi_statsd_dimensions: "{{ default_container_dimensions }}" #################### # OpenStack #################### -gnocchi_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ gnocchi_api_port }}" -gnocchi_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ gnocchi_api_port }}" -gnocchi_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ gnocchi_api_port }}" +gnocchi_admin_endpoint: "{{ admin_protocol }}://{{ gnocchi_internal_fqdn }}:{{ gnocchi_api_port }}" +gnocchi_internal_endpoint: "{{ internal_protocol }}://{{ gnocchi_internal_fqdn }}:{{ gnocchi_api_port }}" +gnocchi_public_endpoint: "{{ public_protocol }}://{{ gnocchi_external_fqdn }}:{{ gnocchi_api_port }}" gnocchi_logging_debug: "{{ openstack_logging_debug }}" diff --git a/ansible/roles/gnocchi/tasks/precheck.yml b/ansible/roles/gnocchi/tasks/precheck.yml index 001953e431..a352d9701d 100644 --- a/ansible/roles/gnocchi/tasks/precheck.yml +++ b/ansible/roles/gnocchi/tasks/precheck.yml @@ -8,7 +8,7 @@ - name: Checking free port for Gnocchi API wait_for: host: "{{ api_interface_address }}" - port: "{{ gnocchi_api_port }}" + port: "{{ gnocchi_api_listen_port }}" connect_timeout: 1 timeout: 1 state: stopped diff --git a/ansible/roles/gnocchi/templates/gnocchi.conf.j2 b/ansible/roles/gnocchi/templates/gnocchi.conf.j2 index 11a50dee5e..9308e74c6c 100644 --- a/ansible/roles/gnocchi/templates/gnocchi.conf.j2 +++ b/ansible/roles/gnocchi/templates/gnocchi.conf.j2 @@ -13,7 +13,7 @@ log_file = /var/log/kolla/gnocchi/gnocchi-api.log {% endif %} [api] -port = {{ gnocchi_api_port }} +port = {{ gnocchi_api_listen_port }} host = {{ api_interface_address }} middlewares = keystonemiddleware.auth_token.AuthProtocol auth_mode = keystone diff --git a/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 b/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 index 399afa948b..3a289ed323 100644 --- a/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 +++ b/ansible/roles/gnocchi/templates/wsgi-gnocchi.conf.j2 @@ -1,12 +1,12 @@ {% set python_path = '/usr/lib/python2.7/site-packages' if gnocchi_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %} {% set wsgi_path = '/usr/bin' if gnocchi_install_type == 'binary' else '/var/lib/kolla/venv/bin' %} -Listen {{ api_interface_address }}:{{ gnocchi_api_port }} +Listen {{ api_interface_address }}:{{ gnocchi_api_listen_port }} ServerSignature Off ServerTokens Prod TraceEnable off - + ErrorLog "/var/log/kolla/gnocchi/gnocchi-api-error.log" LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat