[ffwd3] Ability to run scripts before reboot
In some cases depending on the environments we need to run workarounds right before rebooting into Leapp Upgrade. We now provide LeappPreRebootCommand which can be fed shell script do do so. Example on machine with nonworking console params user can set in system_upgrade.yaml: parameter_defaults: LeappPreRebootCommand: grubby --update-kernel=ALL --remove-args=console=ttyS0,115200n81 grubby --update-kernel=ALL --remove-args=console=ttyS0 Resolves: rhbz#2196288 Change-Id: I1e30b3c00a56cc244ee1c5730ba22e1e33788bca
This commit is contained in:
parent
3c59c354f2
commit
a2c07f0526
@ -120,6 +120,14 @@ parameters:
|
|||||||
type: comma_delimited_list
|
type: comma_delimited_list
|
||||||
tags:
|
tags:
|
||||||
- role_specific
|
- role_specific
|
||||||
|
LeappPreRebootCommand:
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
Command or script snippet to run on all overcloud nodes to
|
||||||
|
apply any necessary workarounds before rebooting into Leapp.
|
||||||
|
default: ''
|
||||||
|
tags:
|
||||||
|
- role_specific
|
||||||
UpgradeInitCommand:
|
UpgradeInitCommand:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
@ -182,6 +190,7 @@ resources:
|
|||||||
upgrade_leapp_actors_to_remove: LeappActorsToRemove
|
upgrade_leapp_actors_to_remove: LeappActorsToRemove
|
||||||
upgrade_init_command: UpgradeInitCommand
|
upgrade_init_command: UpgradeInitCommand
|
||||||
base_tripleo_packages: BaseTripleoPackages
|
base_tripleo_packages: BaseTripleoPackages
|
||||||
|
leapp_pre_reboot_command: LeappPreRebootCommand
|
||||||
- values: {get_param: [RoleParameters]}
|
- values: {get_param: [RoleParameters]}
|
||||||
- values:
|
- values:
|
||||||
DnfStreams: {get_param: DnfStreams}
|
DnfStreams: {get_param: DnfStreams}
|
||||||
@ -190,6 +199,7 @@ resources:
|
|||||||
UpgradeLeappToRemove: {get_param: UpgradeLeappToRemove}
|
UpgradeLeappToRemove: {get_param: UpgradeLeappToRemove}
|
||||||
UpgradeLeappToInstall: {get_param: UpgradeLeappToInstall}
|
UpgradeLeappToInstall: {get_param: UpgradeLeappToInstall}
|
||||||
LeappUnloadKernelDrivers: {get_param: LeappUnloadKernelDrivers}
|
LeappUnloadKernelDrivers: {get_param: LeappUnloadKernelDrivers}
|
||||||
|
LeappPreRebootCommand: {get_param: LeappPreRebootCommand}
|
||||||
LeappActorsToRemove: {get_param: LeappActorsToRemove}
|
LeappActorsToRemove: {get_param: LeappActorsToRemove}
|
||||||
UpgradeInitCommand: {get_param: UpgradeInitCommand}
|
UpgradeInitCommand: {get_param: UpgradeInitCommand}
|
||||||
LeappRepoInitCommand: {get_param: LeappRepoInitCommand}
|
LeappRepoInitCommand: {get_param: LeappRepoInitCommand}
|
||||||
@ -374,6 +384,12 @@ outputs:
|
|||||||
- upgrade_leapp_enabled
|
- upgrade_leapp_enabled
|
||||||
- "'Undercloud' not in group_names"
|
- "'Undercloud' not in group_names"
|
||||||
block:
|
block:
|
||||||
|
- name: Run LeappPreRebootCommand
|
||||||
|
shell:
|
||||||
|
list_join:
|
||||||
|
- ''
|
||||||
|
- - "#!/bin/bash\n\n"
|
||||||
|
- {get_attr: [RoleParametersValue, value, 'leapp_pre_reboot_command']}
|
||||||
- name: reboot to perform the upgrade
|
- name: reboot to perform the upgrade
|
||||||
reboot:
|
reboot:
|
||||||
reboot_timeout: "{{upgrade_leapp_reboot_timeout}}"
|
reboot_timeout: "{{upgrade_leapp_reboot_timeout}}"
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Added LeappPreRebootCommand parameter to the tripleo-packages.
|
||||||
|
This is a list of commands to be executed just before rebooting the node
|
||||||
|
to perform the leapp upgrade.
|
||||||
|
This allows, for example, to remove kernel parameters to avoid affecting
|
||||||
|
the leapp reboot.
|
Loading…
Reference in New Issue
Block a user