Use keystone catalog and fix looking up and storing admin tenant id

Trove is now able to properly use the service catalog [1].

We have another[2] patch that this patch depends-on, which
causes us to have a circular dependency. As the change is minimal,
should be ok to squash them together to be able to fix that role.

The paragraph bellow contains the commit message of the patch that is
being squashed.

The 'Get admin tenant id' task was passing invalid arguments to the
os_project_facts module, and the 'Store admin tenant id' task was not
using the correct variable to retrieve the project id.

[1] https://review.opendev.org/#/c/574254/
[2] https://review.opendev.org/#/c/665458/

Change-Id: I779ba715d20d83b1efe4f07226a5eadd7e0a1870
This commit is contained in:
Jonathan Rosser 2019-06-25 09:24:06 +01:00 committed by Guilherme Steinmüller
parent 2563c39ab0
commit 951924ab51
4 changed files with 6 additions and 19 deletions

View File

@ -57,14 +57,6 @@ trove_service_internalurl: "{{ trove_service_internaluri_proto }}://{{ internal_
trove_service_adminurl: "{{ trove_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ trove_service_port }}/v1.0/%(tenant_id)s" trove_service_adminurl: "{{ trove_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ trove_service_port }}/v1.0/%(tenant_id)s"
trove_auth_url: "{{ keystone_service_internalurl }}" trove_auth_url: "{{ keystone_service_internalurl }}"
# By default assume the trove service network is an internal one
# It would be good to use the catalog service to lookup these URLs based on the endpoint type
# but currently the Trove code doesn't work properly when endpoint types are specified
trove_nova_compute_url: "{{ trove_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ nova_service_port }}/v2.1"
trove_cinder_url: "{{ trove_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ cinder_service_port }}/v1"
trove_swift_url: "{{ trove_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ swift_proxy_port }}/v1/AUTH_"
trove_neutron_url: "{{ trove_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ neutron_service_port }}/"
trove_profiler_enabled: false trove_profiler_enabled: false
## Cap the maximum number of threads / workers when a user value is unspecified. ## Cap the maximum number of threads / workers when a user value is unspecified.

View File

@ -22,13 +22,12 @@
- name: Get admin tenant id - name: Get admin tenant id
os_project_facts: os_project_facts:
cloud: default cloud: default
state: present
name: admin name: admin
interface: "{{ keystone_service_adminurl }}" interface: internal
no_log: True validate_certs: "{{ not (keystone_service_internaluri_insecure | bool) }}"
- name: Store admin tenant id - name: Store admin tenant id
set_fact: set_fact:
keystone_admin_tenant_id: "{{ keystone_facts.id }}" keystone_admin_tenant_id: "{{ ansible_facts.openstack_projects[0].id }}"
- name: Create trove service network - name: Create trove service network
os_network: os_network:

View File

@ -26,22 +26,21 @@ trove_auth_url = {{ trove_auth_url }}
os_region_name = {{ trove_service_region }} os_region_name = {{ trove_service_region }}
# Nova # Nova
nova_compute_url = {{ trove_nova_compute_url }}
nova_compute_service_type = compute nova_compute_service_type = compute
nova_endpoint_type = internalURL
nova_proxy_admin_user = {{ trove_service_user_name }} nova_proxy_admin_user = {{ trove_service_user_name }}
nova_proxy_admin_pass = {{ trove_service_password }} nova_proxy_admin_pass = {{ trove_service_password }}
nova_proxy_admin_tenant_name = {{ trove_service_project_name }} nova_proxy_admin_tenant_name = {{ trove_service_project_name }}
# Cinder # Cinder
cinder_url = {{ trove_cinder_url }} cinder_endpoint_type = internalURL
cinder_service_type = volumev2 cinder_service_type = volumev2
#Swift #Swift
swift_url = {{ trove_swift_url }}
swift_service_type = object-store swift_service_type = object-store
# Neutron # Neutron
neutron_url = {{ trove_neutron_url }} neutron_endpoint_type = internalURL
neutron_service_type = network neutron_service_type = network
network_driver = trove.network.neutron.NeutronDriver network_driver = trove.network.neutron.NeutronDriver
default_neutron_networks = {{ trove_service_net_id }} default_neutron_networks = {{ trove_service_net_id }}

View File

@ -50,7 +50,6 @@ dns_endpoint_url = http://127.0.0.1/v1/
dns_service_type = dns dns_service_type = dns
# Nova # Nova
nova_compute_url = {{ trove_nova_compute_url }}
nova_proxy_admin_user = {{ trove_service_user_name }} nova_proxy_admin_user = {{ trove_service_user_name }}
nova_proxy_admin_pass = {{ trove_service_password }} nova_proxy_admin_pass = {{ trove_service_password }}
nova_proxy_admin_tenant_name = {{ trove_service_project_name }} nova_proxy_admin_tenant_name = {{ trove_service_project_name }}
@ -58,10 +57,8 @@ nova_proxy_admin_tenant_name = {{ trove_service_project_name }}
# Neutron # Neutron
network_driver = trove.network.neutron.NeutronDriver network_driver = trove.network.neutron.NeutronDriver
default_neutron_networks = {{ trove_service_net_id }} default_neutron_networks = {{ trove_service_net_id }}
neutron_url = {{ trove_neutron_url }}
# Swift # Swift
swift_url = {{ trove_swift_url }}
swift_service_type = object-store swift_service_type = object-store
# Taskmanager queue name # Taskmanager queue name