Add pre_upgrade_rolling_tasks
The resultin pre_upgrade_rolling_steps_playbook will be executed in a
node-by-node rolling fashion at the beginning of major upgrade
workflow (before upgrade_steps_playbook).
The current intended use case is special handling of L3 agent upgrade
when moving Neutron services into containers. Special care needs to be
taken in this case to preserve L3 connectivity of instances (with
regard to dnsmasq and keepalived sub-processes of L3 agent).
The playbook can be run before the main upgrade like this:
openstack overcloud upgrade run --roles overcloud --playbook pre_upgrade_rolling_steps_playbook.yaml
Partial-Bug: #1738768
Change-Id: Icb830f8500bb80fd15036e88fcd314bf2c54445d
Implements: blueprint major-upgrade-workflow
(cherry picked from commit ae085825e2
)
This commit is contained in:
parent
f944a1ea17
commit
402a0483ea
|
@ -19,6 +19,7 @@
|
|||
# primary role is: {{primary_role_name}}
|
||||
{% set deploy_steps_max = 6 -%}
|
||||
{% set update_steps_max = 6 -%}
|
||||
{% set pre_upgrade_rolling_steps_max = 1 -%}
|
||||
{% set upgrade_steps_max = 6 -%}
|
||||
{% set post_upgrade_steps_max = 4 -%}
|
||||
{% set fast_forward_upgrade_steps_max = 9 -%}
|
||||
|
@ -537,6 +538,33 @@ outputs:
|
|||
with_sequence: start=1 end={{deploy_steps_max-1}}
|
||||
loop_control:
|
||||
loop_var: step
|
||||
pre_upgrade_rolling_steps_tasks: |
|
||||
{%- for role in roles %}
|
||||
- include: {{role.name}}/pre_upgrade_rolling_tasks.yaml
|
||||
when: role_name == '{{role.name}}'
|
||||
{%- endfor %}
|
||||
pre_upgrade_rolling_steps_playbook: |
|
||||
- hosts: undercloud
|
||||
name: Gather facts undercloud
|
||||
gather_facts: yes
|
||||
become: false
|
||||
- hosts: overcloud
|
||||
name: Gather facts overcloud
|
||||
gather_facts: yes
|
||||
- hosts: all
|
||||
name: Load global variables
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- include_vars: global_vars.yaml
|
||||
- hosts: overcloud
|
||||
name: Run pre-upgrade rolling tasks
|
||||
serial: 1
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- include: pre_upgrade_rolling_steps_tasks.yaml
|
||||
with_sequence: start=0 end={{pre_upgrade_rolling_steps_max-1}}
|
||||
loop_control:
|
||||
loop_var: step
|
||||
upgrade_steps_tasks: |
|
||||
{%- for role in roles %}
|
||||
- include: {{role.name}}/upgrade_tasks.yaml
|
||||
|
|
|
@ -262,6 +262,15 @@ resources:
|
|||
expression: coalesce($.data, []).where($ != null).select($.get('fast_forward_post_upgrade_tasks')).where($ != null).flatten().distinct()
|
||||
data: {get_attr: [ServiceChain, role_data]}
|
||||
|
||||
PreUpgradeRollingTasks:
|
||||
type: OS::Heat::Value
|
||||
properties:
|
||||
type: comma_delimited_list
|
||||
value:
|
||||
yaql:
|
||||
expression: coalesce($.data, []).where($ != null).select($.get('pre_upgrade_rolling_tasks')).where($ != null).flatten().distinct()
|
||||
data: {get_attr: [ServiceChain, role_data]}
|
||||
|
||||
UpgradeTasks:
|
||||
type: OS::Heat::Value
|
||||
properties:
|
||||
|
@ -366,6 +375,7 @@ outputs:
|
|||
external_post_deploy_tasks: {get_attr: [ExternalPostDeployTasks, value]}
|
||||
fast_forward_upgrade_tasks: {get_attr: [FastForwardUpgradeTasks, value]}
|
||||
fast_forward_post_upgrade_tasks: {get_attr: [FastForwardPostUpgradeTasks, value]}
|
||||
pre_upgrade_rolling_tasks: {get_attr: [PreUpgradeRollingTasks, value]}
|
||||
upgrade_tasks: {get_attr: [UpgradeTasks, value]}
|
||||
post_upgrade_tasks: {get_attr: [PostUpgradeTasks, value]}
|
||||
update_tasks: {get_attr: [UpdateTasks, value]}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
pre_upgrade_rolling_tasks are added for use by the composable
|
||||
service templates. The resulting
|
||||
pre_upgrade_rolling_steps_playbook is intended to be run at the
|
||||
beginning of major update workflow (before running the
|
||||
upgrade_steps_playbook). As the name suggests, the tasks in this
|
||||
playbook will be executed in a node-by-node rolling fashion.
|
|
@ -44,6 +44,7 @@ OPTIONAL_SECTIONS = ['workflow_tasks', 'cellv2_discovery']
|
|||
REQUIRED_DOCKER_SECTIONS = ['service_name', 'docker_config', 'puppet_config',
|
||||
'config_settings']
|
||||
OPTIONAL_DOCKER_SECTIONS = ['docker_puppet_tasks', 'upgrade_tasks',
|
||||
'pre_upgrade_rolling_tasks',
|
||||
'fast_forward_upgrade_tasks',
|
||||
'fast_forward_post_upgrade_tasks',
|
||||
'post_upgrade_tasks', 'update_tasks',
|
||||
|
|
Loading…
Reference in New Issue