Update SX to DX migration to wait for coredns config

This commit updates the SX to DX migration playbook to wait after
modifying the system mode to duplex until the runtime manifest that
updates coredns config has completed. The playbook will wait for up to
20 minutes to allow for the possibilty that sysinv has multiple
runtime manifests queued up, each of which could take several minutes.

Depends-On: https://review.opendev.org/c/starlingx/stx-puppet/+/792494
Depends-On: https://review.opendev.org/c/starlingx/config/+/792496
Change-Id: I3bf94d3493ae20eeb16b3fdcb27576ee18c0dc4d
Closes-Bug: 1929148
Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
Don Penney 2021-05-20 23:09:07 -04:00
parent 6727db7fe8
commit 0261f22ff7

View File

@ -56,6 +56,7 @@
- set_fact:
duplex_mode: "{{ duplex_mode | default('duplex') }}"
kubernetes_duplex_migration_flag: '/var/run/.kubernetes_duplex_migration_complete'
- name: Query system_mode
shell: source /etc/platform/openrc; system show | awk '$2 == "system_mode" { print $4 }'
@ -85,6 +86,16 @@
failed_when: false
when: current_system_mode.stdout == 'simplex'
# Wait up to 20 minutes for the runtime manifest triggered by the previous
# "system modify -m duplex" command, as there may be other runtime manifests
# being applied
- name: Wait for kubernetes duplex migration manifest completion, up to 20 minutes
wait_for:
path: "{{ kubernetes_duplex_migration_flag }}"
state: present
timeout: 1200
msg: Timeout waiting for kubernetes duplex migration manifest completion
- name: Update OAM configuration
shell: >-
source /etc/platform/openrc;