Merge "Fix removing previous secondary mgmt configuration"

This commit is contained in:
Zuul 2024-09-05 13:46:09 +00:00 committed by Gerrit Code Review
commit 3961c4b7be
2 changed files with 12 additions and 7 deletions
playbookconfig/src/playbooks/roles/bootstrap
bringup-essential-services/tasks
persist-config/tasks

@ -77,16 +77,20 @@
- block:
- name: Remove previous secondary management floating address if management network config has changed
command: ip addr delete {{ prev_mgmt_floating_virtual_secondary }} dev lo scope host
when: last_config_file_exists and reconfigure_endpoints and
prev_mgmt_floating_virtual_secondary is defined and
(mgmt_floating_virtual_secondary != prev_mgmt_floating_virtual_secondary)
when: (last_config_file_exists and reconfigure_endpoints and
prev_mgmt_floating_virtual_secondary is defined) and
(mgmt_floating_virtual_secondary is not defined or
(mgmt_floating_virtual_secondary is defined and
(mgmt_floating_virtual_secondary != prev_mgmt_floating_virtual_secondary)))
- name: Remove previous secondary management virtual address if management network config has changed
command: ip addr delete {{ prev_mgmt_virtual_secondary }} brd {{ management_broadcast_secondary }} dev lo:1 scope host
when: last_config_file_exists and reconfigure_endpoints and
command: ip addr delete {{ prev_mgmt_virtual_secondary }} brd {{ prev_mgmt_broadcast_secondary }} dev lo:1 scope host
when: (last_config_file_exists and reconfigure_endpoints and
prev_mgmt_virtual_secondary is defined and
management_broadcast_secondary is defined and
(mgmt_virtual_secondary != prev_mgmt_virtual_secondary)
prev_mgmt_broadcast_secondary is defined) and
(mgmt_virtual_secondary is not defined or
(mgmt_virtual_secondary is defined and
(mgmt_virtual_secondary != prev_mgmt_virtual_secondary)))
- name: Create symlinks for current Kubernetes version
import_role:

@ -140,6 +140,7 @@
prev_controller_floating_address_secondary:
"{{ default_prev_management_start_address_secondary
if prev_management_start_address == 'derived' else prev_network_params.prev_management_start_address_secondary }}"
prev_mgmt_broadcast_secondary: "{{ prev_network_params.prev_management_subnet_secondary | ipaddr('broadcast') }}"
when: prev_network_params.prev_management_subnet_secondary
- name: Set secondary cluster-host facts derived from previous network configurations