Add post delay to reboot

Leapp may reconfigure network after main upgrade. Also systemd may bring
down and up again network unit. This patch adds post_reboot_delay as 2 min to
mitigate such issues which can be configurable as heat variable in
customers env files for some very specific cases. Also test_command is
changed from whoami to systemctl to have better assesment when a system
completed its boot.

Closes-Bug: rhbz#1920293

Change-Id: Iaa6fdef24599072f5a31c1fd2da29c276399c83d
(cherry picked from commit a9bf1c1285)
This commit is contained in:
Sergii Golovatiuk 2021-01-26 02:00:54 +01:00 committed by Jesse Pretorius (odyssey4me)
parent c197f7440e
commit 678186027f
1 changed files with 10 additions and 0 deletions

View File

@ -64,6 +64,12 @@ parameters:
description: Timeout (seconds) for the OS upgrade phase via Leapp
type: number
default: 3600
UpgradeLeappPostRebootDelay:
description: |
Maximum (seconds) to wait for machine to reboot and respond to a test
command.
type: number
default: 120
UpgradeLeappToRemove:
default: []
description: List of packages to remove during Leapp upgrade.
@ -145,6 +151,7 @@ outputs:
upgrade_leapp_devel_skip: {get_param: UpgradeLeappDevelSkip}
upgrade_leapp_command_options: {get_param: UpgradeLeappCommandOptions}
upgrade_leapp_reboot_timeout: {get_param: UpgradeLeappRebootTimeout}
upgrade_leapp_post_reboot_delay: {get_param: UpgradeLeappPostRebootDelay}
vars:
_upgradeLeappEnabled: {get_param: UpgradeLeappEnabled}
tags:
@ -319,6 +326,9 @@ outputs:
- name: reboot to perform the upgrade
reboot:
reboot_timeout: "{{upgrade_leapp_reboot_timeout}}"
test_command: >-
systemctl is-system-running | grep -e running -e degraded
post_reboot_delay: "{{ upgrade_leapp_post_reboot_delay }}"
- name: Set the python to python3
vars:
ansible_python_interpreter: "/usr/bin/python3"