Fix neutron-server default serial

By default we should prevent all neutron server going down at the same time
Instead we should apply approach where we upgrade single neutron server
and the rest of hosts next time
to decrease API downtime

Additionally changed default for neutron_other_serial, to safe 1
 as in case of big amount of network nodes, several l3 agents may
went down at the same time, and make ha router unavaliable.

Change-Id: I618ea5083da29e7188c093c96f40ca3db6f9e5cc
This commit is contained in:
Dmitriy Rabotyagov 2020-08-17 18:27:44 +03:00 committed by Dmitriy Rabotyagov (noonedeadpunk)
parent 0527afbe7f
commit 1a57af20e8
2 changed files with 26 additions and 2 deletions

View File

@ -32,6 +32,18 @@
- neutron
pre_tasks:
# In order to ensure that any container, software or
# config file changes which causes a container/service
# restart do not cause an unexpected outage, we drain
# the load balancer back end for this container.
- include_tasks: ../common-tasks/haproxy-endpoint-manage.yml
vars:
haproxy_backend: neutron_server-back
haproxy_state: disabled
when:
- "'neutron_server' in group_names"
- "groups['neutron_server'] | length > 1"
- name: Determine tunnel bridge IP address
include_tasks: ../common-tasks/dynamic-address-fact.yml
vars:
@ -95,3 +107,15 @@
- role: "system_crontab_coordination"
tags:
- crontab
post_tasks:
# Now that container changes are done, we can set
# the load balancer back end for this container
# to available again.
- include_tasks: ../common-tasks/haproxy-endpoint-manage.yml
vars:
haproxy_backend: neutron_server-back
haproxy_state: enabled
when:
- "'neutron_server' in group_names"
- "groups['neutron_server'] | length > 1"

View File

@ -31,7 +31,7 @@
include: common-playbooks/neutron.yml
vars:
neutron_hosts: "neutron_server"
neutron_serial: "{{ neutron_server_serial | default('100%') }}"
neutron_serial: "{{ neutron_server_serial | default(['1', '100%']) }}"
@ -47,4 +47,4 @@
include: common-playbooks/neutron.yml
vars:
neutron_hosts: "neutron_all:!neutron_linuxbridge_agent:!neutron_openvswitch_agent:!neutron_server"
neutron_serial: "{{ neutron_other_serial | default('20%') }}"
neutron_serial: "{{ neutron_other_serial | default('1') }}"