From cfe93911dadd710ca5041726d625aa8959bcc7e6 Mon Sep 17 00:00:00 2001 From: caoyuan Date: Fri, 23 Sep 2016 08:16:51 +0800 Subject: [PATCH] Fix the url of Cinder endpoints When use "openstack endpoint list" to list the endpoints of cinder service, the url is not right. This patch fix it. closes-Bug: #1627061 Change-Id: I43756421680f4ce59f7cbfb02509aa96c9e5ca9b --- ansible/roles/cinder/defaults/main.yml | 9 ++++++--- ansible/roles/cinder/tasks/register.yml | 6 +++--- .../fix-cinder-endpoints-urls-22746b1524accbbf.yaml | 3 +++ 3 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/fix-cinder-endpoints-urls-22746b1524accbbf.yaml diff --git a/ansible/roles/cinder/defaults/main.yml b/ansible/roles/cinder/defaults/main.yml index c9de204ee8..afa105a77f 100644 --- a/ansible/roles/cinder/defaults/main.yml +++ b/ansible/roles/cinder/defaults/main.yml @@ -50,9 +50,12 @@ cinder_api_image_full: "{{ cinder_api_image }}:{{ cinder_api_tag }}" #################### # OpenStack #################### -cinder_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ cinder_api_port }}/v2/%(tenant_id)s" -cinder_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ cinder_api_port }}/v2/%(tenant_id)s" -cinder_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ cinder_api_port }}/v2/%(tenant_id)s" +cinder_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ cinder_api_port }}/v1/%(tenant_id)s" +cinder_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ cinder_api_port }}/v1/%(tenant_id)s" +cinder_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ cinder_api_port }}/v1/%(tenant_id)s" +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_logging_debug: "{{ openstack_logging_debug }}" diff --git a/ansible/roles/cinder/tasks/register.yml b/ansible/roles/cinder/tasks/register.yml index 4f18c0a71c..550077034c 100644 --- a/ansible/roles/cinder/tasks/register.yml +++ b/ansible/roles/cinder/tasks/register.yml @@ -21,9 +21,9 @@ - {'interface': 'admin', 'url': '{{ cinder_admin_endpoint }}', 'service_name': 'cinder', 'service_type': 'volume'} - {'interface': 'internal', 'url': '{{ cinder_internal_endpoint }}', 'service_name': 'cinder', 'service_type': 'volume'} - {'interface': 'public', 'url': '{{ cinder_public_endpoint }}', 'service_name': 'cinder', 'service_type': 'volume'} - - {'interface': 'admin', 'url': '{{ cinder_admin_endpoint }}', 'service_name': 'cinderv2', 'service_type': 'volumev2'} - - {'interface': 'internal', 'url': '{{ cinder_internal_endpoint }}', 'service_name': 'cinderv2', 'service_type': 'volumev2'} - - {'interface': 'public', 'url': '{{ cinder_public_endpoint }}', 'service_name': 'cinderv2', 'service_type': 'volumev2'} + - {'interface': 'admin', 'url': '{{ cinder_v2_admin_endpoint }}', 'service_name': 'cinderv2', 'service_type': 'volumev2'} + - {'interface': 'internal', 'url': '{{ cinder_v2_internal_endpoint }}', 'service_name': 'cinderv2', 'service_type': 'volumev2'} + - {'interface': 'public', 'url': '{{ cinder_v2_public_endpoint }}', 'service_name': 'cinderv2', 'service_type': 'volumev2'} - name: Creating the Cinder project, user, and role command: docker exec -t kolla_toolbox /usr/bin/ansible localhost diff --git a/releasenotes/notes/fix-cinder-endpoints-urls-22746b1524accbbf.yaml b/releasenotes/notes/fix-cinder-endpoints-urls-22746b1524accbbf.yaml new file mode 100644 index 0000000000..ed8bb28194 --- /dev/null +++ b/releasenotes/notes/fix-cinder-endpoints-urls-22746b1524accbbf.yaml @@ -0,0 +1,3 @@ +--- +fixes: + - The wrong urls of Cinder Service endpoints was fixed.