Fix AIO-SX to AIO-DX with admin network
This commit fixes an issue seen when attempting to migrate from an AIO-SX to AIO-DX subcloud using the admin network. The current code assumes the network name of the admin network is 'admin'. This is not necessarily the case, as the admin network can be user created and can be named anything. The solution is to determine the name of the network of type 'admin', and use that to determine the interface/network association. Testing: - Perform AIO-SX to AIO-DX migration for a system with a user defined network name of type 'admin' Story: 2010319 Task: 47563 Change-Id: Idad594494c8dbb0a8d8471a5ee2574cc2083a5d3 Signed-off-by: Steven Webster <steven.webster@windriver.com>
This commit is contained in:
@@ -46,10 +46,17 @@
|
||||
system interface-network-list controller-0 --nowrap | awk '$8 == "cluster-host" { print $6 }'
|
||||
register: cluster_host_if
|
||||
|
||||
- name: Get subcloud admin network name
|
||||
shell: >-
|
||||
source /etc/platform/openrc; system network-list |
|
||||
awk '$8 == "admin" { print $6 }'
|
||||
register: subcloud_admin_network_name
|
||||
|
||||
- name: Query admin interface configuration
|
||||
shell: |
|
||||
source /etc/platform/openrc
|
||||
system interface-network-list controller-0 --nowrap | awk '$8 == "admin" { print $6 }'
|
||||
system interface-network-list controller-0 --nowrap |
|
||||
awk '$8 == "{{ subcloud_admin_network_name.stdout }}" { print $6 }'
|
||||
register: admin_if
|
||||
|
||||
- name: Validate network interface configuration
|
||||
|
||||
@@ -105,10 +105,17 @@
|
||||
when: system_mode != 'simplex'
|
||||
|
||||
- block:
|
||||
|
||||
- name: Get previous subcloud admin network name
|
||||
shell: >-
|
||||
source /etc/platform/openrc; system network-list |
|
||||
awk '$8 == "admin" { print $6 }'
|
||||
register: subcloud_admin_network_name
|
||||
|
||||
- name: Get ifname of the existing admin network of controller-0
|
||||
shell: >-
|
||||
source /etc/platform/openrc; system interface-network-list controller-0 |
|
||||
awk '$8 == "admin" { print $6 }'
|
||||
awk '$8 == "{{ subcloud_admin_network_name.stdout }}" { print $6 }'
|
||||
register: controller_0_admin_network_if
|
||||
|
||||
- name: Fail if admin network interface of controller-0 is not assigned
|
||||
@@ -124,7 +131,7 @@
|
||||
- name: Get ifname of the existing admin network of controller-1
|
||||
shell: >-
|
||||
source /etc/platform/openrc; system interface-network-list controller-1 |
|
||||
awk '$8 == "admin" { print $6 }'
|
||||
awk '$8 == "{{ subcloud_admin_network_name.stdout }}" { print $6 }'
|
||||
register: controller_1_admin_network_if
|
||||
|
||||
- name: Fail if admin network interface of controller-1 is not assigned
|
||||
|
||||
Reference in New Issue
Block a user