diff --git a/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml b/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml index 94a48c4ee7..ff4c9f6117 100644 --- a/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml +++ b/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml @@ -120,6 +120,14 @@ parameters: type: comma_delimited_list tags: - 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: type: string description: | @@ -182,6 +190,7 @@ resources: upgrade_leapp_actors_to_remove: LeappActorsToRemove upgrade_init_command: UpgradeInitCommand base_tripleo_packages: BaseTripleoPackages + leapp_pre_reboot_command: LeappPreRebootCommand - values: {get_param: [RoleParameters]} - values: DnfStreams: {get_param: DnfStreams} @@ -190,6 +199,7 @@ resources: UpgradeLeappToRemove: {get_param: UpgradeLeappToRemove} UpgradeLeappToInstall: {get_param: UpgradeLeappToInstall} LeappUnloadKernelDrivers: {get_param: LeappUnloadKernelDrivers} + LeappPreRebootCommand: {get_param: LeappPreRebootCommand} LeappActorsToRemove: {get_param: LeappActorsToRemove} UpgradeInitCommand: {get_param: UpgradeInitCommand} LeappRepoInitCommand: {get_param: LeappRepoInitCommand} @@ -374,6 +384,12 @@ outputs: - upgrade_leapp_enabled - "'Undercloud' not in group_names" 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 reboot: reboot_timeout: "{{upgrade_leapp_reboot_timeout}}" diff --git a/releasenotes/notes/leapp-pre-reboot-command-7d7040d80ff132e4.yaml b/releasenotes/notes/leapp-pre-reboot-command-7d7040d80ff132e4.yaml new file mode 100644 index 0000000000..16f013c906 --- /dev/null +++ b/releasenotes/notes/leapp-pre-reboot-command-7d7040d80ff132e4.yaml @@ -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.