From 63c1365d94b2246a0be8580026aff001e6d8fce8 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Sat, 9 May 2020 16:10:18 +0200 Subject: [PATCH] Pass proper VIPs on Standalone With HA being the default we should now specify the VIPs as well. This way pacemaker will create the separate VIP and haproxy will listen to it and we won't have both haproxy and the service itself listening to the same port on the same IP. Note: that we tried to make this work without creating a VIP at all and having haproxy's backend services listen to localhost only and leave haproxy to listen on the standalone IP, but this quickly became impossible to make it work due to how things are coded in a number of places (bootstrap hostname checks, pacemaker properties,etc.) Related-Bug: #1889395 Change-Id: I367cf4b65300be8dca0190b9adeab549018d4a56 --- roles/standalone/defaults/main.yml | 1 + roles/standalone/tasks/main.yml | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/standalone/defaults/main.yml b/roles/standalone/defaults/main.yml index 5e0d4c551..8044cceeb 100644 --- a/roles/standalone/defaults/main.yml +++ b/roles/standalone/defaults/main.yml @@ -3,6 +3,7 @@ standalone_config: standalone_config.yaml.j2 standalone_network: 192.168.24 standalone_network_prefix: 24 standalone_ip: 192.168.24.1 +standalone_ha_control_virtual_ip: 192.168.24.3 standalone_interface: br-ex standalone_hostname: standalone.localdomain diff --git a/roles/standalone/tasks/main.yml b/roles/standalone/tasks/main.yml index 5dac1e607..e46fbd26b 100644 --- a/roles/standalone/tasks/main.yml +++ b/roles/standalone/tasks/main.yml @@ -247,6 +247,10 @@ include_role: name: validate-perf +- name: Check whether control plane defaults to HA + set_fact: + tripleo_deploy_ha_control_plane: "{{ release not in ['newton', 'ocata', 'pike', 'queens', 'rocky', 'stein', 'train'] }}" + - name: Run standalone via tripleo-operator-ansible collections: - tripleo.operator @@ -256,7 +260,8 @@ tripleo_deploy_debug: true tripleo_deploy_debug_arg: "{{ standalone_tripleo_deploy_debug_arg }}" tripleo_deploy_local_ip: "{{ standalone_ip }}/{{ standalone_network_prefix }}" - tripleo_deploy_control_virtual_ip: "{{ standalone_control_virtual_ip|default() }}" + tripleo_deploy_control_virtual_ip: "{{ standalone_control_virtual_ip|default() or \ + (standalone_ha_control_virtual_ip|default() if tripleo_deploy_ha_control_plane) }}" tripleo_deploy_roles_file: "{{ overcloud_templates_path }}/roles/{{ standalone_role }}" tripleo_deploy_output_dir: "{{ working_dir }}" tripleo_deploy_environment_files: |-