From 6e9da4753af83e5b1c34f6ee7c35854c15a72bb0 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Thu, 19 Aug 2021 14:32:08 +0300 Subject: [PATCH] Add serial execution to all playbooks Since OSA aims to do HA, it's important to run at least one copy of service at all times. Currently we do restart/run roles agaist all hosts inside a group for most of the services. This cause global service interruption if run without limit until service is restarted. To avoid this from happening, we add serial execution globally for all services with ability to override that behaviour. Change-Id: I5f6b8f9de32124a363cfe2c6191a4971f528cd70 --- playbooks/etcd-install.yml | 1 + playbooks/galera-install.yml | 2 +- playbooks/haproxy-install.yml | 2 +- playbooks/memcached-install.yml | 1 + playbooks/os-aodh-install.yml | 1 + playbooks/os-barbican-install.yml | 1 + playbooks/os-blazar-install.yml | 1 + playbooks/os-ceilometer-install.yml | 1 + playbooks/os-designate-install.yml | 1 + playbooks/os-gnocchi-install.yml | 1 + playbooks/os-heat-install.yml | 1 + playbooks/os-horizon-install.yml | 1 + playbooks/os-ironic-install.yml | 1 + playbooks/os-magnum-install.yml | 1 + playbooks/os-manila-install.yml | 1 + playbooks/os-masakari-install.yml | 2 ++ playbooks/os-mistral-install.yml | 1 + playbooks/os-murano-install.yml | 1 + playbooks/os-octavia-install.yml | 1 + playbooks/os-placement-install.yml | 1 + playbooks/os-sahara-install.yml | 1 + playbooks/os-senlin-install.yml | 1 + playbooks/os-tacker-install.yml | 1 + playbooks/os-trove-install.yml | 1 + playbooks/os-zun-install.yml | 1 + playbooks/qdrouterd-install.yml | 2 +- playbooks/rabbitmq-install.yml | 4 ++-- playbooks/repo-install.yml | 1 + playbooks/unbound-install.yml | 1 + playbooks/utility-install.yml | 1 + 30 files changed, 32 insertions(+), 5 deletions(-) diff --git a/playbooks/etcd-install.yml b/playbooks/etcd-install.yml index cc46e17084..bb3fc96141 100644 --- a/playbooks/etcd-install.yml +++ b/playbooks/etcd-install.yml @@ -22,6 +22,7 @@ - name: Install etcd server cluster hosts: etcd gather_facts: false + serial: "{{ etcd_serial | default(1) }}" user: root pre_tasks: - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" diff --git a/playbooks/galera-install.yml b/playbooks/galera-install.yml index 27c5a3b5cf..8f4532ce52 100644 --- a/playbooks/galera-install.yml +++ b/playbooks/galera-install.yml @@ -22,7 +22,7 @@ - name: Install galera server hosts: galera_all gather_facts: false - serial: 1 + serial: "{{ galera_serial | default(1) }}" user: root pre_tasks: - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" diff --git a/playbooks/haproxy-install.yml b/playbooks/haproxy-install.yml index 6e1edaf59d..2fff43a8e9 100644 --- a/playbooks/haproxy-install.yml +++ b/playbooks/haproxy-install.yml @@ -22,7 +22,7 @@ - name: haproxy base config hosts: haproxy gather_facts: false - serial: "50%" + serial: "{{ haproxy_serial | default('50%') }}" user: root pre_tasks: - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" diff --git a/playbooks/memcached-install.yml b/playbooks/memcached-install.yml index 0bc5040f07..06437c2fc4 100644 --- a/playbooks/memcached-install.yml +++ b/playbooks/memcached-install.yml @@ -22,6 +22,7 @@ - name: Install memcached hosts: memcached gather_facts: false + serial: "{{ memcached_serial | default(['1','100%']) }}" user: root pre_tasks: - include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" diff --git a/playbooks/os-aodh-install.yml b/playbooks/os-aodh-install.yml index bbb70afed5..a1627e4850 100644 --- a/playbooks/os-aodh-install.yml +++ b/playbooks/os-aodh-install.yml @@ -22,6 +22,7 @@ - name: Install the aodh components hosts: aodh_all gather_facts: false + serial: "{{ aodh_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-barbican-install.yml b/playbooks/os-barbican-install.yml index 14156c2ed3..33b7ad3b08 100644 --- a/playbooks/os-barbican-install.yml +++ b/playbooks/os-barbican-install.yml @@ -22,6 +22,7 @@ - name: Installation and setup of barbican hosts: barbican_all gather_facts: false + serial: "{{ barbican_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-blazar-install.yml b/playbooks/os-blazar-install.yml index e9da391925..37e8289c2e 100644 --- a/playbooks/os-blazar-install.yml +++ b/playbooks/os-blazar-install.yml @@ -22,6 +22,7 @@ - name: Install blazar components hosts: blazar_all gather_facts: false + serial: "{{ blazar_serial | default(['1','100%']) }}" environment: "{{ deployment_environment_variables | default({}) }}" user: root vars_files: diff --git a/playbooks/os-ceilometer-install.yml b/playbooks/os-ceilometer-install.yml index 9743793d2d..db74f80f49 100644 --- a/playbooks/os-ceilometer-install.yml +++ b/playbooks/os-ceilometer-install.yml @@ -22,6 +22,7 @@ - name: Install the ceilometer components hosts: ceilometer_all gather_facts: false + serial: "{{ ceilometer_serial | default(['1','100%']) }}" user: root vars_files: - "defaults/repo_packages/openstack_services.yml" diff --git a/playbooks/os-designate-install.yml b/playbooks/os-designate-install.yml index 727182ffc4..9ca59b4de8 100644 --- a/playbooks/os-designate-install.yml +++ b/playbooks/os-designate-install.yml @@ -25,6 +25,7 @@ - name: Install designate server hosts: designate_all gather_facts: false + serial: "{{ designate_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-gnocchi-install.yml b/playbooks/os-gnocchi-install.yml index 231ec1ced5..4d48d19df5 100644 --- a/playbooks/os-gnocchi-install.yml +++ b/playbooks/os-gnocchi-install.yml @@ -22,6 +22,7 @@ - name: Install Gnocchi components hosts: gnocchi_all gather_facts: false + serial: "{{ gnocchi_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-heat-install.yml b/playbooks/os-heat-install.yml index ecf40ab399..ff8d44aa69 100644 --- a/playbooks/os-heat-install.yml +++ b/playbooks/os-heat-install.yml @@ -22,6 +22,7 @@ - name: Install heat server hosts: heat_all gather_facts: false + serial: "{{ heat_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" tags: diff --git a/playbooks/os-horizon-install.yml b/playbooks/os-horizon-install.yml index 3396819752..3d37c7a761 100644 --- a/playbooks/os-horizon-install.yml +++ b/playbooks/os-horizon-install.yml @@ -22,6 +22,7 @@ - name: Install horizon server hosts: horizon_all gather_facts: false + serial: "{{ horizon_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-ironic-install.yml b/playbooks/os-ironic-install.yml index fb481e7283..dd2ee07c39 100644 --- a/playbooks/os-ironic-install.yml +++ b/playbooks/os-ironic-install.yml @@ -22,6 +22,7 @@ - name: Installation and setup of Ironic hosts: ironic_all gather_facts: false + serial: "{{ ironic_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-magnum-install.yml b/playbooks/os-magnum-install.yml index 6fff53fb54..249f0970cc 100644 --- a/playbooks/os-magnum-install.yml +++ b/playbooks/os-magnum-install.yml @@ -26,6 +26,7 @@ hosts: magnum_all user: root gather_facts: false + serial: "{{ magnum_serial | default(['1','100%']) }}" environment: "{{ deployment_environment_variables | default({}) }}" vars_files: - "defaults/repo_packages/openstack_services.yml" diff --git a/playbooks/os-manila-install.yml b/playbooks/os-manila-install.yml index 8426d21b47..47237e4eaf 100644 --- a/playbooks/os-manila-install.yml +++ b/playbooks/os-manila-install.yml @@ -19,6 +19,7 @@ - name: Gather manila facts hosts: manila_all gather_facts: "{{ osa_gather_facts | default(True) }}" + serial: "{{ manila_serial | default(['1','100%']) }}" tags: - always diff --git a/playbooks/os-masakari-install.yml b/playbooks/os-masakari-install.yml index 9e86740c0d..c094ae5b94 100644 --- a/playbooks/os-masakari-install.yml +++ b/playbooks/os-masakari-install.yml @@ -22,6 +22,7 @@ - name: Setup corosync cluster hosts: masakari_monitor gather_facts: false + serial: "{{ masakari_monitor_serial | default('100%') }}" user: root vars: pacemaker_corosync_group: masakari_monitor @@ -42,6 +43,7 @@ - name: Install the masakari components hosts: masakari_all gather_facts: false + serial: "{{ masakari_api_serial | default(['1','100%']) }}" user: root vars_files: - "defaults/repo_packages/openstack_services.yml" diff --git a/playbooks/os-mistral-install.yml b/playbooks/os-mistral-install.yml index 405110f061..f112d9dae0 100644 --- a/playbooks/os-mistral-install.yml +++ b/playbooks/os-mistral-install.yml @@ -22,6 +22,7 @@ - name: Install mistral components hosts: mistral_all gather_facts: false + serial: "{{ mistral_serial | default(['1','100%']) }}" environment: "{{ deployment_environment_variables | default({}) }}" user: root vars_files: diff --git a/playbooks/os-murano-install.yml b/playbooks/os-murano-install.yml index e6a6714141..379b63aadc 100644 --- a/playbooks/os-murano-install.yml +++ b/playbooks/os-murano-install.yml @@ -22,6 +22,7 @@ - name: Install murano components hosts: murano_all gather_facts: false + serial: "{{ murano_serial | default(['1','100%']) }}" environment: "{{ deployment_environment_variables | default({}) }}" user: root vars_files: diff --git a/playbooks/os-octavia-install.yml b/playbooks/os-octavia-install.yml index 747aa98109..4c7f2a783d 100644 --- a/playbooks/os-octavia-install.yml +++ b/playbooks/os-octavia-install.yml @@ -22,6 +22,7 @@ - name: Install octavia server hosts: octavia_all gather_facts: false + serial: "{{ octavia_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-placement-install.yml b/playbooks/os-placement-install.yml index a887427658..6744e99403 100644 --- a/playbooks/os-placement-install.yml +++ b/playbooks/os-placement-install.yml @@ -22,6 +22,7 @@ - name: Install placement components hosts: placement_all gather_facts: false + serial: "{{ placement_api_serial | default(['1','100%']) }}" environment: "{{ deployment_environment_variables | default({}) }}" user: root vars_files: diff --git a/playbooks/os-sahara-install.yml b/playbooks/os-sahara-install.yml index 7a7e490996..66da1ea23b 100644 --- a/playbooks/os-sahara-install.yml +++ b/playbooks/os-sahara-install.yml @@ -20,6 +20,7 @@ - name: Install sahara server hosts: sahara_all gather_facts: "{{ osa_gather_facts | default(True) }}" + serial: "{{ sahara_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-senlin-install.yml b/playbooks/os-senlin-install.yml index f6e229023f..cb337f11a5 100644 --- a/playbooks/os-senlin-install.yml +++ b/playbooks/os-senlin-install.yml @@ -22,6 +22,7 @@ - name: Install senlin services hosts: senlin_all gather_facts: false + serial: "{{ senlin_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-tacker-install.yml b/playbooks/os-tacker-install.yml index 52e3266519..33675dc173 100644 --- a/playbooks/os-tacker-install.yml +++ b/playbooks/os-tacker-install.yml @@ -22,6 +22,7 @@ - name: Install the tacker components hosts: tacker_all gather_facts: false + serial: "{{ tacker_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-trove-install.yml b/playbooks/os-trove-install.yml index 4841b702de..1b2cdca5e0 100644 --- a/playbooks/os-trove-install.yml +++ b/playbooks/os-trove-install.yml @@ -25,6 +25,7 @@ - name: Install trove server hosts: trove_all gather_facts: false + serial: "{{ trove_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: diff --git a/playbooks/os-zun-install.yml b/playbooks/os-zun-install.yml index f4c84824e8..39584b9d03 100644 --- a/playbooks/os-zun-install.yml +++ b/playbooks/os-zun-install.yml @@ -22,6 +22,7 @@ - name: Install the zun components hosts: zun_all gather_facts: false + serial: "{{ zun_serial | default(['1','100%']) }}" user: root vars_files: - "defaults/repo_packages/openstack_services.yml" diff --git a/playbooks/qdrouterd-install.yml b/playbooks/qdrouterd-install.yml index 2ebb59f1a9..aa77153404 100644 --- a/playbooks/qdrouterd-install.yml +++ b/playbooks/qdrouterd-install.yml @@ -21,7 +21,7 @@ - name: Create and configure qdrouterd container hosts: "{{ qdrouterd_host_group | default('qdrouterd_all') }}" - serial: 1 + serial: "{{ qdrouterd_serial | default(1) }}" gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" diff --git a/playbooks/rabbitmq-install.yml b/playbooks/rabbitmq-install.yml index e378c92c28..6f673613ab 100644 --- a/playbooks/rabbitmq-install.yml +++ b/playbooks/rabbitmq-install.yml @@ -21,7 +21,7 @@ - name: Create and configure rabbitmq container hosts: "{{ rabbitmq_host_group | default('rabbitmq_all') }}" - serial: 1 + serial: "{{ rabbitmq_serial | default('20%') }}" gather_facts: false user: root pre_tasks: @@ -56,7 +56,7 @@ - name: Install rabbitmq server hosts: "{{ rabbitmq_host_group | default('rabbitmq_all') }}" gather_facts: false - serial: 20% + serial: "{{ rabbitmq_serial | default('20%') }}" user: root roles: - role: "rabbitmq_server" diff --git a/playbooks/repo-install.yml b/playbooks/repo-install.yml index aa5131b088..f05bc2a24c 100644 --- a/playbooks/repo-install.yml +++ b/playbooks/repo-install.yml @@ -22,6 +22,7 @@ - name: Setup repo servers hosts: repo_all gather_facts: false + serial: "{{ repo_serial | default(['1','100%']) }}" user: root pre_tasks: - name: End playbook diff --git a/playbooks/unbound-install.yml b/playbooks/unbound-install.yml index a8b571293b..566b875f73 100644 --- a/playbooks/unbound-install.yml +++ b/playbooks/unbound-install.yml @@ -22,6 +22,7 @@ - name: Install unbound DNS resolvers hosts: unbound gather_facts: false + serial: "{{ unbound_serial | default(['1','100%']) }}" user: root pre_tasks: - include_tasks: common-tasks/os-log-dir-setup.yml diff --git a/playbooks/utility-install.yml b/playbooks/utility-install.yml index 4544ac6327..ebd0da0253 100644 --- a/playbooks/utility-install.yml +++ b/playbooks/utility-install.yml @@ -23,6 +23,7 @@ hosts: utility_all user: root gather_facts: false + serial: "{{ utility_serial | default(['1','100%']) }}" environment: "{{ deployment_environment_variables | default({}) }}" vars_files: - "defaults/repo_packages/openstack_services.yml"