Remove haproxy,keepalived groups

Haproxy was renamed in [1].

[1] https://review.opendev.org/c/openstack/kolla-ansible/+/770618

Change-Id: Ib2d7f0774fede570a8c4c315d83afd420c31da0b
This commit is contained in:
Michal Arbet 2021-09-03 16:41:50 +02:00
parent 21b4dc5416
commit f0241f807f
13 changed files with 90 additions and 81 deletions

View File

@ -29,7 +29,7 @@ storage
monitoring
[chrony-server:children]
haproxy
loadbalancer
[chrony:children]
control
@ -78,12 +78,6 @@ compute
[loadbalancer:children]
network
[keepalived:children]
loadbalancer
[haproxy:children]
loadbalancer
[mariadb:children]
control
@ -697,7 +691,7 @@ storage
mariadb
[prometheus-haproxy-exporter:children]
haproxy
loadbalancer
[prometheus-memcached-exporter:children]
memcached

View File

@ -53,7 +53,7 @@ storage
monitoring
[chrony-server:children]
haproxy
loadbalancer
[chrony:children]
control
@ -102,12 +102,6 @@ compute
[loadbalancer:children]
network
[keepalived:children]
loadbalancer
[haproxy:children]
loadbalancer
[mariadb:children]
control
@ -715,7 +709,7 @@ storage
mariadb
[prometheus-haproxy-exporter:children]
haproxy
loadbalancer
[prometheus-memcached-exporter:children]
memcached

View File

@ -4,7 +4,7 @@ project_name: "loadbalancer"
loadbalancer_services:
haproxy:
container_name: haproxy
group: haproxy
group: loadbalancer
enabled: true
image: "{{ haproxy_image_full }}"
privileged: True
@ -13,7 +13,7 @@ loadbalancer_services:
healthcheck: "{{ haproxy_healthcheck }}"
keepalived:
container_name: keepalived
group: keepalived
group: loadbalancer
enabled: "{{ enable_keepalived | bool }}"
image: "{{ keepalived_image_full }}"
privileged: True

View File

@ -19,7 +19,7 @@
changed_when: false
when:
- enable_keepalived | bool
- inventory_hostname in groups['keepalived']
- inventory_hostname in groups['loadbalancer']
- name: Group hosts by whether they are running HAProxy
group_by:
@ -27,7 +27,7 @@
changed_when: false
when:
- enable_haproxy | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- name: Set facts about whether we can run HAProxy and keepalived VIP prechecks
vars:
@ -116,7 +116,7 @@
when:
- enable_haproxy | bool
- container_facts['haproxy'] is not defined
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- name: Checking free port for HAProxy monitor (api interface)
wait_for:
@ -128,7 +128,7 @@
when:
- enable_haproxy | bool
- container_facts['haproxy'] is not defined
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- name: Checking free port for HAProxy monitor (vip interface)
wait_for:
@ -140,7 +140,7 @@
when:
- enable_haproxy | bool
- haproxy_vip_prechecks
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- api_interface_address != kolla_internal_vip_address
# FIXME(yoctozepto): this req seems arbitrary, they need not be, just routable is fine
@ -178,7 +178,7 @@
state: stopped
when:
- enable_aodh | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('aodh_api') == -1
- haproxy_vip_prechecks
@ -191,7 +191,7 @@
state: stopped
when:
- enable_barbican | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('barbican_api') == -1
- haproxy_vip_prechecks
@ -204,7 +204,7 @@
state: stopped
when:
- enable_blazar | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('blazar_api') == -1
- haproxy_vip_prechecks
@ -217,7 +217,7 @@
state: stopped
when:
- enable_cinder | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('cinder_api') == -1
- haproxy_vip_prechecks
@ -230,7 +230,7 @@
state: stopped
when:
- enable_cloudkitty | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('cloudkitty_api') == -1
- haproxy_vip_prechecks
@ -243,7 +243,7 @@
state: stopped
when:
- enable_cyborg | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('cyborg_api') == -1
- haproxy_vip_prechecks
@ -256,7 +256,7 @@
state: stopped
when:
- enable_designate | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('designate_api') == -1
- haproxy_vip_prechecks
@ -269,7 +269,7 @@
state: stopped
when:
- enable_elasticsearch | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('elasticsearch') == -1
- haproxy_vip_prechecks
@ -282,7 +282,7 @@
state: stopped
when:
- enable_glance | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('glance_api') == -1
- haproxy_vip_prechecks
@ -295,7 +295,7 @@
state: stopped
when:
- enable_gnocchi | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('gnocchi_api') == -1
- haproxy_vip_prechecks
@ -309,7 +309,7 @@
when:
- enable_freezer | bool
- haproxy_stat.find('freezer_api') == -1
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_vip_prechecks
- name: Checking free port for Grafana server HAProxy
@ -321,7 +321,7 @@
state: stopped
when:
- enable_grafana | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('grafana_server') == -1
- haproxy_vip_prechecks
@ -334,7 +334,7 @@
state: stopped
when:
- enable_heat | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('heat_api') == -1
- haproxy_vip_prechecks
@ -347,7 +347,7 @@
state: stopped
when:
- enable_heat | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('heat_api_cfn') == -1
- haproxy_vip_prechecks
@ -360,7 +360,7 @@
state: stopped
when:
- enable_horizon | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('horizon') == -1
- haproxy_vip_prechecks
@ -373,7 +373,7 @@
state: stopped
when:
- enable_ironic | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('ironic_api') == -1
- haproxy_vip_prechecks
@ -386,7 +386,7 @@
state: stopped
when:
- enable_ironic | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('ironic_inspector') == -1
- haproxy_vip_prechecks
@ -399,7 +399,7 @@
state: stopped
when:
- enable_keystone | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('keystone_admin') == -1
- haproxy_vip_prechecks
@ -412,7 +412,7 @@
state: stopped
when:
- enable_keystone | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('keystone_internal') == -1
- haproxy_vip_prechecks
@ -426,7 +426,7 @@
when:
- haproxy_enable_external_vip | bool
- enable_keystone | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('keystone_external') == -1
- haproxy_vip_prechecks
@ -439,7 +439,7 @@
state: stopped
when:
- enable_kibana | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('kibana') == -1
- haproxy_vip_prechecks
@ -452,7 +452,7 @@
state: stopped
when:
- enable_magnum | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('magnum_api') == -1
- haproxy_vip_prechecks
@ -465,7 +465,7 @@
state: stopped
when:
- enable_manila | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('manila_api') == -1
- haproxy_vip_prechecks
@ -478,7 +478,7 @@
state: stopped
when:
- enable_mariadb | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('mariadb') == -1
- haproxy_vip_prechecks
@ -491,7 +491,7 @@
state: stopped
when:
- enable_masakari | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('masakari_api') == -1
- haproxy_vip_prechecks
@ -504,7 +504,7 @@
state: stopped
when:
- enable_mistral | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('mistral_api') == -1
- haproxy_vip_prechecks
@ -517,7 +517,7 @@
state: stopped
when:
- enable_monasca | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('monasca_api') == -1
- haproxy_vip_prechecks
@ -531,7 +531,7 @@
when:
- haproxy_enable_external_vip | bool
- enable_monasca | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('monasca_api_external') == -1
- haproxy_vip_prechecks
@ -544,7 +544,7 @@
state: stopped
when:
- enable_monasca | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('monasca_log_api') == -1
- haproxy_vip_prechecks
- monasca_log_api_port != monasca_api_port
@ -559,7 +559,7 @@
when:
- haproxy_enable_external_vip | bool
- enable_monasca | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('monasca_log_api_external') == -1
- haproxy_vip_prechecks
- monasca_log_api_port != monasca_api_port
@ -573,7 +573,7 @@
state: stopped
when:
- enable_murano | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('murano_api') == -1
- haproxy_vip_prechecks
@ -586,7 +586,7 @@
state: stopped
when:
- enable_neutron | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('neutron_server') == -1
- haproxy_vip_prechecks
@ -599,7 +599,7 @@
state: stopped
when:
- enable_nova | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('nova_api') == -1
- haproxy_vip_prechecks
@ -612,7 +612,7 @@
state: stopped
when:
- enable_nova | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('nova_metadata') == -1
- haproxy_vip_prechecks
@ -626,7 +626,7 @@
when:
- enable_nova | bool
- nova_console == 'novnc'
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('nova_novncproxy') == -1
- haproxy_vip_prechecks
@ -641,7 +641,7 @@
- enable_nova | bool
- haproxy_stat.find('nova_serialconsole_proxy') == -1
- enable_nova_serialconsole_proxy | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_vip_prechecks
- name: Checking free port for Nova Spice HTML5 HAProxy
@ -654,7 +654,7 @@
when:
- enable_nova | bool
- nova_console == 'spice'
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('nova_spicehtml5proxy') == -1
- haproxy_vip_prechecks
@ -667,7 +667,7 @@
state: stopped
when:
- enable_nova | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('placement_api') == -1
- haproxy_vip_prechecks
@ -680,7 +680,7 @@
state: stopped
when:
- enable_octavia | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('octavia_api') == -1
- haproxy_vip_prechecks
@ -693,7 +693,7 @@
state: stopped
when:
- enable_rabbitmq | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('rabbitmq_management') == -1
- haproxy_vip_prechecks
@ -705,7 +705,7 @@
state: stopped
when:
- enable_outward_rabbitmq | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('outward_rabbitmq_management') == -1
- haproxy_vip_prechecks
@ -718,7 +718,7 @@
state: stopped
when:
- enable_sahara | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('sahara_api') == -1
- haproxy_vip_prechecks
@ -731,7 +731,7 @@
state: stopped
when:
- enable_senlin | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('senlin_api') == -1
- haproxy_vip_prechecks
@ -744,7 +744,7 @@
state: stopped
when:
- enable_solum | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('solum_application_deployment') == -1
- haproxy_vip_prechecks
@ -757,7 +757,7 @@
state: stopped
when:
- enable_solum | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('solum_image_builder') == -1
- haproxy_vip_prechecks
@ -770,7 +770,7 @@
state: stopped
when:
- enable_swift | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('swift_api') == -1
- haproxy_vip_prechecks
@ -783,7 +783,7 @@
state: stopped
when:
- enable_tacker | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('tacker_server') == -1
- haproxy_vip_prechecks
@ -796,7 +796,7 @@
state: stopped
when:
- enable_trove | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('trove_api') == -1
- haproxy_vip_prechecks
@ -809,7 +809,7 @@
state: stopped
when:
- enable_watcher | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('watcher_api') == -1
- haproxy_vip_prechecks
@ -822,7 +822,7 @@
state: stopped
when:
- enable_zun | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('zun_api') == -1
- haproxy_vip_prechecks
@ -834,6 +834,6 @@
state: stopped
when:
- enable_vitrage | bool
- inventory_hostname in groups['haproxy']
- inventory_hostname in groups['loadbalancer']
- haproxy_stat.find('vitrage_api') == -1
- haproxy_vip_prechecks

View File

@ -0,0 +1,11 @@
---
- name: Fail if group loadbalancer not exists or it is empty
fail:
msg: >-
Inventory's group loadbalancer does not exist or it is empty.
Please update inventory, as haproxy group was renamed
to loadbalancer in the Xena release.
when:
- enable_loadbalancer | bool
- groups['loadbalancer'] is not defined or
groups['loadbalancer'] | length < 1

View File

@ -1,4 +1,6 @@
---
- import_tasks: inventory_checks.yml
- include_tasks: host_os_checks.yml
when: prechecks_enable_host_os_checks | bool

View File

@ -51,7 +51,7 @@
[[inputs.chrony]]
dns_lookup = false
{% endif %}
{% if inventory_hostname in groups['haproxy'] and enable_haproxy | bool %}
{% if inventory_hostname in groups['loadbalancer'] and enable_haproxy | bool %}
[[inputs.haproxy]]
servers = ["{{ haproxy_proto }}://{{ haproxy_user }}:{{ haproxy_password }}@{{ api_interface_address | put_address_in_context('url') }}:{{ haproxy_stats_port }}"]
{% endif %}

View File

@ -120,6 +120,8 @@
- '&enable_loadbalancer_True'
serial: '{{ kolla_serial|default("0") }}'
tags:
- haproxy
- keepalived
- loadbalancer
roles:
- { role: loadbalancer,

View File

@ -79,7 +79,7 @@ Using this way, you need to adjust the inventory file:
If you choose to use haproxy for load balancing between the
members of the cluster, every node within this group
needs to be resolvable and reachable from all
the hosts within the ``[haproxy:children]`` group
the hosts within the ``[loadbalancer:children]`` group
of your inventory (defaults to ``[network]``).
In addition, configure the ``/etc/kolla/globals.yml`` file

View File

@ -9,7 +9,7 @@ Openstack and other services. High-availability in Kolla
is implented as via Keepalived and HAProxy. Keepalived manages virtual IP
addresses, while HAProxy load-balances traffic to service backends.
These two components must be installed on the same hosts
and they are deployed to hosts in the ``haproxy`` group.
and they are deployed to hosts in the ``loadbalancer`` group.
Preparation and deployment
~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -129,7 +129,7 @@ grouped together and changing these around can break your deployment:
[elasticsearch:children]
control
[haproxy:children]
[loadbalancer:children]
network
.. _multinode-host-and-group-variables:

View File

@ -0,0 +1,5 @@
---
upgrade:
- A new group ``loadbalancer`` is required in inventory file
prior to upgrade. The ``loadbalancer`` group is a replacement
for the ``haproxy`` group.

View File

@ -98,7 +98,7 @@ storage
monitoring
[chrony-server:children]
haproxy
loadbalancer
[chrony:children]
control
@ -157,12 +157,13 @@ compute
[loadbalancer:children]
network
{% if is_previous_release and previous_release == "wallaby" %}
[keepalived:children]
loadbalancer
[haproxy:children]
loadbalancer
{% endif %}
[mariadb:children]
control
@ -768,7 +769,7 @@ storage
mariadb
[prometheus-haproxy-exporter:children]
haproxy
loadbalancer
[prometheus-memcached-exporter:children]
memcached