diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index df35e488e7..4d507c087e 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -190,7 +190,10 @@ barbican_api_port: "9311" blazar_api_port: "1234" +cinder_internal_fqdn: "{{ kolla_internal_fqdn }}" +cinder_external_fqdn: "{{ kolla_external_fqdn }}" cinder_api_port: "8776" +cinder_api_listen_port: "{{ cinder_api_port }}" congress_api_port: "1789" diff --git a/ansible/roles/cinder/defaults/main.yml b/ansible/roles/cinder/defaults/main.yml index 2463d6801b..473c282104 100644 --- a/ansible/roles/cinder/defaults/main.yml +++ b/ansible/roles/cinder/defaults/main.yml @@ -19,11 +19,13 @@ cinder_services: mode: "http" external: false port: "{{ cinder_api_port }}" + listen_port: "{{ cinder_api_listen_port }}" cinder_api_external: enabled: "{{ enable_cinder }}" mode: "http" external: true port: "{{ cinder_api_port }}" + listen_port: "{{ cinder_api_listen_port }}" cinder-scheduler: container_name: cinder_scheduler group: cinder-scheduler @@ -153,12 +155,12 @@ cinder_volume_dimensions: "{{ default_container_dimensions }}" #################### # OpenStack #################### -cinder_v2_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ cinder_api_port }}/v2/%(tenant_id)s" -cinder_v2_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ cinder_api_port }}/v2/%(tenant_id)s" -cinder_v2_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ cinder_api_port }}/v2/%(tenant_id)s" -cinder_v3_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ cinder_api_port }}/v3/%(tenant_id)s" -cinder_v3_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ cinder_api_port }}/v3/%(tenant_id)s" -cinder_v3_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ cinder_api_port }}/v3/%(tenant_id)s" +cinder_v2_admin_endpoint: "{{ admin_protocol }}://{{ cinder_internal_fqdn }}:{{ cinder_api_port }}/v2/%(tenant_id)s" +cinder_v2_internal_endpoint: "{{ internal_protocol }}://{{ cinder_internal_fqdn }}:{{ cinder_api_port }}/v2/%(tenant_id)s" +cinder_v2_public_endpoint: "{{ public_protocol }}://{{ cinder_external_fqdn }}:{{ cinder_api_port }}/v2/%(tenant_id)s" +cinder_v3_admin_endpoint: "{{ admin_protocol }}://{{ cinder_internal_fqdn }}:{{ cinder_api_port }}/v3/%(tenant_id)s" +cinder_v3_internal_endpoint: "{{ internal_protocol }}://{{ cinder_internal_fqdn }}:{{ cinder_api_port }}/v3/%(tenant_id)s" +cinder_v3_public_endpoint: "{{ public_protocol }}://{{ cinder_external_fqdn }}:{{ cinder_api_port }}/v3/%(tenant_id)s" cinder_logging_debug: "{{ openstack_logging_debug }}" diff --git a/ansible/roles/cinder/tasks/precheck.yml b/ansible/roles/cinder/tasks/precheck.yml index 060fe0cbd6..b49a6f47bb 100644 --- a/ansible/roles/cinder/tasks/precheck.yml +++ b/ansible/roles/cinder/tasks/precheck.yml @@ -8,7 +8,7 @@ - name: Checking free port for Cinder API wait_for: host: "{{ api_interface_address }}" - port: "{{ cinder_api_port }}" + port: "{{ cinder_api_listen_port }}" connect_timeout: 1 timeout: 1 state: stopped diff --git a/ansible/roles/cinder/templates/cinder-wsgi.conf.j2 b/ansible/roles/cinder/templates/cinder-wsgi.conf.j2 index a514fefa16..224b07f137 100644 --- a/ansible/roles/cinder/templates/cinder-wsgi.conf.j2 +++ b/ansible/roles/cinder/templates/cinder-wsgi.conf.j2 @@ -1,11 +1,11 @@ {% set python_path = '/usr/lib/python2.7/site-packages' if cinder_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %} -Listen {{ api_interface_address }}:{{ cinder_api_port }} +Listen {{ api_interface_address }}:{{ cinder_api_listen_port }} ServerSignature Off ServerTokens Prod TraceEnable off - + WSGIDaemonProcess cinder-api processes={{ openstack_service_workers }} threads=1 user=cinder group=cinder display-name=%{GROUP} python-path={{ python_path }} WSGIProcessGroup cinder-api WSGIScriptAlias / /var/www/cgi-bin/cinder/cinder-wsgi diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index eb9491eb1d..6eef0f113c 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -51,7 +51,7 @@ backup_swift_key = {% endif %} osapi_volume_listen = {{ api_interface_address }} -osapi_volume_listen_port = {{ cinder_api_port }} +osapi_volume_listen_port = {{ cinder_api_listen_port }} api_paste_config = /etc/cinder/api-paste.ini