From dda24c47bcc0df3695630fd473864c36cf487989 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 15 Dec 2017 13:52:49 +0000 Subject: [PATCH] Fix ironic inspector public endpoint Fixes a bug where the Baremetal Introspection service's public endpoint registered in the Identity service referenced the internal API endpoint. Also updates keystone endpoints for the Baremetal and Baremetal Introspection services during reconfigure and upgrade operations. Previously this was only done during deploy. Change-Id: I32d475f288bb4a3834c13cc86f0c53b5437c3d25 Closes-Bug: #1738418 --- ansible/roles/ironic/defaults/main.yml | 4 ++-- ansible/roles/ironic/tasks/reconfigure.yml | 5 +++++ ansible/roles/ironic/tasks/upgrade.yml | 5 +++++ ansible/roles/ironic/templates/ironic.conf.j2 | 1 + .../notes/inspector-public-endpoint-61e0adc37f882a64.yaml | 5 +++++ 5 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/inspector-public-endpoint-61e0adc37f882a64.yaml diff --git a/ansible/roles/ironic/defaults/main.yml b/ansible/roles/ironic/defaults/main.yml index 7212e13062..64cb7bdeab 100644 --- a/ansible/roles/ironic/defaults/main.yml +++ b/ansible/roles/ironic/defaults/main.yml @@ -50,8 +50,8 @@ ironic_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{ ironic_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ ironic_api_port }}" ironic_inspector_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ ironic_inspector_port }}" -ironic_inspector_internal_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ ironic_inspector_port }}" -ironic_inspector_public_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ ironic_inspector_port }}" +ironic_inspector_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ ironic_inspector_port }}" +ironic_inspector_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ ironic_inspector_port }}" ironic_logging_debug: "{{ openstack_logging_debug }}" diff --git a/ansible/roles/ironic/tasks/reconfigure.yml b/ansible/roles/ironic/tasks/reconfigure.yml index e5884da046..4ee048264f 100644 --- a/ansible/roles/ironic/tasks/reconfigure.yml +++ b/ansible/roles/ironic/tasks/reconfigure.yml @@ -1,4 +1,9 @@ --- +- include: register.yml + when: enable_keystone | bool and + (inventory_hostname in groups['ironic-api'] or + inventory_hostname in groups['ironic-inspector']) + - name: Ensuring the containers up kolla_docker: name: "{{ item.name }}" diff --git a/ansible/roles/ironic/tasks/upgrade.yml b/ansible/roles/ironic/tasks/upgrade.yml index 308053080c..1b6a511f04 100644 --- a/ansible/roles/ironic/tasks/upgrade.yml +++ b/ansible/roles/ironic/tasks/upgrade.yml @@ -1,4 +1,9 @@ --- +- include: register.yml + when: enable_keystone | bool and + (inventory_hostname in groups['ironic-api'] or + inventory_hostname in groups['ironic-inspector']) + - include: config.yml - include: bootstrap_service.yml diff --git a/ansible/roles/ironic/templates/ironic.conf.j2 b/ansible/roles/ironic/templates/ironic.conf.j2 index e5bc320940..ff6a5bc58a 100644 --- a/ansible/roles/ironic/templates/ironic.conf.j2 +++ b/ansible/roles/ironic/templates/ironic.conf.j2 @@ -83,6 +83,7 @@ user_domain_id = default project_name = service username = {{ ironic_keystone_user }} password = {{ ironic_keystone_password }} +service_url = {{ ironic_inspector_internal_endpoint }} [agent] deploy_logs_local_path = /var/log/kolla/ironic diff --git a/releasenotes/notes/inspector-public-endpoint-61e0adc37f882a64.yaml b/releasenotes/notes/inspector-public-endpoint-61e0adc37f882a64.yaml new file mode 100644 index 0000000000..f665dec2e2 --- /dev/null +++ b/releasenotes/notes/inspector-public-endpoint-61e0adc37f882a64.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes a bug where the Baremetal Introspection service's public endpoint + registered in the Identity service referenced the internal API endpoint.