Skip to content

Commit 70a7188

Browse files
committed
[OVN][Migration] Enable settings backup subnet for NFS clients
If the BACKUP_MIGRATION_IP is set to a different IP outside of the default nets[1] set in the “openstack overcloud backup” playbook setup_nfs role[2]. Then the NFS will fail to mount directories during the backup, because they will not be reachable | permitted. This change simply adds a new variable BACKUP_MIGRATION_CTL_PLANE_CIDRS into the ovn_migration script to allow the user to overwrite the extra-var used for Openstack overcloud backup --setup-nfs command. [1] https://opendev.org/openstack/tripleo-ansible/src/commit/e281ae7624774d71f22fbb993af967ed1ec08780/tripleo_ansible/roles/backup_and_restore/defaults/main.yml#L47 [2] https://opendev.org/openstack/tripleo-ansible/src/commit/e281ae7624774d71f22fbb993af967ed1ec08780/tripleo_ansible/roles/backup_and_restore/tasks/setup_nfs.yml#L127 Change-Id: I160dfc4e893b93ac7a40e19b3dd6b89750dac57d (cherry picked from commit b677d65)
1 parent 5c4f902 commit 70a7188

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

doc/source/ovn/migration.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ Perform the following steps in the undercloud
155155
server that will be used as a NFS server to store the backup.
156156
Default: 192.168.24.1
157157

158+
* BACKUP_MIGRATION_CTL_PLANE_CIDRS - Only used if CREATE_BACKUP is enabled.
159+
A comma separated string of control plane subnets in CIDR notation for the
160+
controllers being backed up. The specified subnets will be used to enable
161+
NFS remote clients connections.
162+
Default: 192.168.24.0/24
163+
158164
.. warning::
159165

160166
Please note that VALIDATE_MIGRATION requires enough quota (2

tools/ovn_migration/tripleo_environment/ovn_migration.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ LANG=C
4242
: ${VALIDATE_MIGRATION:=False}
4343
: ${DHCP_RENEWAL_TIME:=30}
4444
: ${CREATE_BACKUP:=True}
45-
: ${BACKUP_MIGRATION_IP:=192.168.24.1} # TODO: Document this new var
45+
: ${BACKUP_MIGRATION_IP:=192.168.24.1}
46+
: ${BACKUP_MIGRATION_CTL_PLANE_CIDRS:=192.168.24.0/24}
4647

4748

4849
check_for_necessary_files() {
@@ -328,6 +329,7 @@ start_migration() {
328329
-e overcloudrc=$OVERCLOUDRC_FILE \
329330
-e stackrc=$STACKRC_FILE \
330331
-e backup_migration_ip=$BACKUP_MIGRATION_IP \
332+
-e backup_migration_ctl_plane_cidrs=$BACKUP_MIGRATION_CTL_PLANE_CIDRS \
331333
-e create_backup=$CREATE_BACKUP \
332334
-e ansible_inventory=$inventory_file \
333335
-e validate_migration=$VALIDATE_MIGRATION $*

tools/ovn_migration/tripleo_environment/playbooks/roles/recovery-backup/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
--setup-nfs \
3737
--extra-vars '{
3838
"tripleo_backup_and_restore_server": {{ backup_migration_ip }},
39+
"tripleo_backup_and_restore_clients_nets": {{ backup_migration_ctl_plane_cidrs.split(',') }},
3940
"nfs_server_group_name": {{ revert_preparation_server_name }}
4041
}'
4142

0 commit comments

Comments
 (0)