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_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
## Cap the maximum number of threads / workers when a user value is unspecified.

View File

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

View File

@ -26,22 +26,21 @@ trove_auth_url = {{ trove_auth_url }}
os_region_name = {{ trove_service_region }}
# Nova
nova_compute_url = {{ trove_nova_compute_url }}
nova_compute_service_type = compute
nova_endpoint_type = internalURL
nova_proxy_admin_user = {{ trove_service_user_name }}
nova_proxy_admin_pass = {{ trove_service_password }}
nova_proxy_admin_tenant_name = {{ trove_service_project_name }}
# Cinder
cinder_url = {{ trove_cinder_url }}
cinder_endpoint_type = internalURL
cinder_service_type = volumev2
#Swift
swift_url = {{ trove_swift_url }}
swift_service_type = object-store
# Neutron
neutron_url = {{ trove_neutron_url }}
neutron_endpoint_type = internalURL
neutron_service_type = network
network_driver = trove.network.neutron.NeutronDriver
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
# Nova
nova_compute_url = {{ trove_nova_compute_url }}
nova_proxy_admin_user = {{ trove_service_user_name }}
nova_proxy_admin_pass = {{ trove_service_password }}
nova_proxy_admin_tenant_name = {{ trove_service_project_name }}
@ -58,10 +57,8 @@ nova_proxy_admin_tenant_name = {{ trove_service_project_name }}
# Neutron
network_driver = trove.network.neutron.NeutronDriver
default_neutron_networks = {{ trove_service_net_id }}
neutron_url = {{ trove_neutron_url }}
# Swift
swift_url = {{ trove_swift_url }}
swift_service_type = object-store
# Taskmanager queue name