bnr Added the NETWORKING_PREPARATION_COMMANDS

This variable is used in the restoration process to configure the network.
ReaR does not know how to configure ovs interfaces. This variable can be
used to configured them before the backup process. So on the
restoration process the network will be configured without manual
iteraction.

Change-Id: Iefec64e09c83b5acc146159663cffcfc47aa606a
(cherry picked from commit 70fd309d74)
This commit is contained in:
Juan Badia Payno 2021-09-13 12:17:57 +02:00
parent 25e4f53ea9
commit e5c2be904e
2 changed files with 11 additions and 0 deletions

View File

@ -62,6 +62,14 @@ tripleo_backup_and_restore_local_config:
BACKUP_PROG_COMPRESS_OPTIONS: '( --gzip)'
BACKUP_PROG_COMPRESS_SUFFIX: '".gz"'
# This var is used to define the commands to be run for preparing the network
# during the restoration phase. Because ReaR does not support ovs, it is required
# to setup the network for connecting to the backup node.
# This is configured on /etc/rear/local.conf
# as an example
# ('ip l a br-ex type bridge' 'ip l s ens3 up' 'ip l s br-ex up' 'ip l s ens3 master br-ex' 'dhclient br-ex')
tripleo_backup_and_restore_network_preparation_commands: "()"
# This var is a dictionary of the configuration of the /etc/rear/rescue.conf
# The key:value will be interpreted as key=value on the configuration file.
# To set that the value is a string, it needs to be single quoted followed by

View File

@ -13,3 +13,6 @@ BACKUP_URL={{ tripleo_backup_and_restore_backup_url }}
{% for item in (tripleo_backup_and_restore_local_config | dict2items) %}
{{ item.key }}={{ item.value }}
{% endfor %}
{% if tripleo_backup_and_restore_network_preparation_commands != '()' %}
NETWORKING_PREPARATION_COMMANDS={{ tripleo_backup_and_restore_network_preparation_commands }}
{% endif %}