Skip to content

Commit

Permalink
Add a retry on the endpoint declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
cdelgehier authored and vincent-legoll committed May 28, 2018
1 parent 3e2429a commit aa4e85c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ An Ansible role for keystone. Specifically, the responsibilities of this role ar
| Variable | Default | Comments (type) |
| :--- | :--- | :--- |
| `openio_keystone_bind_interface` | `"{{ ansible_default_ipv4.alias }}"` | Name of the NIC to use |
| `openio_keystone_bind_address` | `"{{ hostvars[inventory_hostname]['ansible_' + openio_keystone_bind_interface]['ipv4']['address'] }}"` | IP address to use |
| `openio_keystone_bindir` | `/usr/bin` | OpenStack's bin folde |
| `openio_keystone_bootstrap_all_nodes` | `false` | Bootstrap the first endpoint on all nodes |
| `openio_keystone_cloudname` | `openio` | The cloud name in the /etc/openstack/clouds.yaml |
Expand Down
17 changes: 9 additions & 8 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ openio_keystone_namespace: "OPENIO"
openio_keystone_serviceid: "0"

openio_keystone_bind_interface: "{{ ansible_default_ipv4.alias }}"
openio_keystone_bind_address:
"{{ hostvars[inventory_hostname]['ansible_' + openio_keystone_bind_interface]['ipv4']['address'] }}"

openio_keystone_repo_managed: false
openio_keystone_openstack_distribution: pike
Expand All @@ -14,8 +16,7 @@ openio_keystone_database_sqlite_directory: /var/lib/keystone
openio_keystone_database_sqlite_file: keystone.db
openio_keystone_database_mysql_connection_user: keystone
openio_keystone_database_mysql_connection_password: KEYSTONE_PASS
openio_keystone_database_mysql_connection_address:
"{{ hostvars[inventory_hostname]['ansible_' + openio_keystone_bind_interface]['ipv4']['address'] }}"
openio_keystone_database_mysql_connection_address: "{{ openio_keystone_bind_address }}"
openio_keystone_database_mysql_connection_database: keystone


Expand Down Expand Up @@ -79,11 +80,11 @@ openio_keystone_services_to_bootstrap:
role: admin
regionid: RegionOne
adminurl:
"http://{{ hostvars[inventory_hostname]['ansible_' + openio_keystone_bind_interface]['ipv4']['address'] }}:35357"
"http://{{ openio_keystone_bind_address }}:35357"
publicurl:
"http://{{ hostvars[inventory_hostname]['ansible_' + openio_keystone_bind_interface]['ipv4']['address'] }}:5000"
"http://{{ openio_keystone_bind_address }}:5000"
internalurl:
"http://{{ hostvars[inventory_hostname]['ansible_' + openio_keystone_bind_interface]['ipv4']['address'] }}:5000"
"http://{{ openio_keystone_bind_address }}:5000"

openio_keystone_cloudname: openio
openio_keystone_users:
Expand All @@ -98,11 +99,11 @@ openio_keystone_services:
description: OpenIO SDS swift proxy
endpoint:
- interface: admin
url: "http://{{ hostvars[inventory_hostname]['ansible_' + openio_keystone_bind_interface]['ipv4']['address'] }}:6007/v1/AUTH_%(tenant_id)s"
url: "http://{{ openio_keystone_bind_address }}:6007/v1/AUTH_%(tenant_id)s"
- interface: internal
url: "http://{{ hostvars[inventory_hostname]['ansible_' + openio_keystone_bind_interface]['ipv4']['address'] }}:6007/v1/AUTH_%(tenant_id)s"
url: "http://{{ openio_keystone_bind_address }}:6007/v1/AUTH_%(tenant_id)s"
- interface: public
url: "http://{{ hostvars[inventory_hostname]['ansible_' + openio_keystone_bind_interface]['ipv4']['address'] }}:6007/v1/AUTH_%(tenant_id)s"
url: "http://{{ openio_keystone_bind_address }}:6007/v1/AUTH_%(tenant_id)s"


openio_keystone_projects:
Expand Down
4 changes: 4 additions & 0 deletions tasks/postinstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,8 @@
- endpoint
run_once: true
when: add_service is changed
register: add_endpoint
until: add_endpoint is success
retries: 5
delay: 10
...

0 comments on commit aa4e85c

Please sign in to comment.