Merge "Add support for persistence of MariaDB data during reprovisioning"
This commit is contained in:
commit
d062c5ea56
@ -753,6 +753,7 @@ outputs:
|
||||
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
|
||||
loop_control:
|
||||
loop_var: step
|
||||
tags: always
|
||||
post_upgrade_steps_tasks: |
|
||||
{%- for role in roles %}
|
||||
- import_tasks: {{role.name}}/post_upgrade_tasks.yaml
|
||||
|
@ -35,6 +35,9 @@ parameters:
|
||||
MysqlClustercheckPassword:
|
||||
type: string
|
||||
hidden: true
|
||||
MysqlUpgradePersist:
|
||||
type: boolean
|
||||
default: false
|
||||
RoleName:
|
||||
default: ''
|
||||
description: Role name on which the service is applied
|
||||
@ -348,6 +351,38 @@ outputs:
|
||||
# Got to check that pacemaker_is_active is working fine with bundle.
|
||||
# TODO: pacemaker_is_active resource doesn't support bundle.
|
||||
upgrade_tasks:
|
||||
- vars:
|
||||
mysql_upgrade_persist: {get_param: MysqlUpgradePersist}
|
||||
when:
|
||||
- step|int == 1
|
||||
- mysql_upgrade_persist
|
||||
tags:
|
||||
- never
|
||||
- system_upgrade_prepare
|
||||
block:
|
||||
- name: Ban galera from local node
|
||||
command: /usr/sbin/pcs resource ban galera-bundle {{ansible_hostname}} --wait
|
||||
- name: Persist mysql data
|
||||
include_role:
|
||||
name: tripleo-persist
|
||||
tasks_from: persist.yml
|
||||
vars:
|
||||
tripleo_persist_dir: /var/lib/mysql
|
||||
- vars:
|
||||
mysql_upgrade_persist: {get_param: MysqlUpgradePersist}
|
||||
when:
|
||||
- step|int == 1
|
||||
- mysql_upgrade_persist
|
||||
tags:
|
||||
- never
|
||||
- system_upgrade_run
|
||||
block:
|
||||
- name: Restore mysql data
|
||||
include_role:
|
||||
name: tripleo-persist
|
||||
tasks_from: restore.yml
|
||||
vars:
|
||||
tripleo_persist_dir: /var/lib/mysql
|
||||
- when: step|int == 0
|
||||
tags: common
|
||||
block:
|
||||
|
@ -258,7 +258,6 @@ CONFIG_RESOURCE_TYPES = [
|
||||
'OS::Heat::StructuredConfig'
|
||||
]
|
||||
|
||||
VALID_ANSIBLE_UPGRADE_TAGS = [ 'common', 'validation', 'pre-upgrade' ]
|
||||
WORKFLOW_TASKS_EXCLUSIONS = [
|
||||
'./docker/services/octavia/octavia-deployment-config.yaml',
|
||||
'./docker/services/ceph-ansible/ceph-external.yaml',
|
||||
@ -1184,21 +1183,15 @@ def validate_upgrade_tasks(upgrade_tasks):
|
||||
|
||||
for task in upgrade_tasks:
|
||||
task_name = task.get("name", "")
|
||||
if task.get("tags"):
|
||||
if (task["tags"] not in VALID_ANSIBLE_UPGRADE_TAGS):
|
||||
print('ERROR: Task (%s) includes unexpected \'tags: (%s)\' ' % (task_name, task["tags"]))
|
||||
return 1
|
||||
whenline = task.get("when", "")
|
||||
if (type(whenline) == list):
|
||||
if any('step|int ' in condition for condition in whenline) and ('step|int == ' not in whenline[0]):
|
||||
print('ERROR: \'step|int ==\' condition should be evaluated first in when conditions for task (%s)' % (task))
|
||||
return 1
|
||||
else:
|
||||
|
||||
whenline = task.get("when", "")
|
||||
if (type(whenline) == list):
|
||||
if any('step|int ' in condition for condition in whenline) and ('step|int == ' not in whenline[0]):
|
||||
print('ERROR: \'step|int ==\' condition should be evaluated first in when conditions for task (%s)' % (task))
|
||||
return 1
|
||||
else:
|
||||
if (' and ' in whenline) and (' or ' not in whenline) \
|
||||
and args.quiet < 2:
|
||||
print("Warning: Consider specifying \'and\' conditions as a list to improve readability in task: \"%s\"" % (task_name))
|
||||
if (' and ' in whenline) and (' or ' not in whenline) \
|
||||
and args.quiet < 2:
|
||||
print("Warning: Consider specifying \'and\' conditions as a list to improve readability in task: \"%s\"" % (task_name))
|
||||
return 0
|
||||
|
||||
def validate_network_data_file(data_file_path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user