Skip to content

Commit

Permalink
Resolve merge conflict.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffmcutter committed Mar 27, 2024
2 parents 95edff0 + 6ddbaeb commit 87e259f
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelogs/fragments/kernel_modules_unload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
minor_changes:
- Add option to unload kernel modules prior to running leapp upgrade (kernel_modules_to_unload_before_upgrade).
...
1 change: 1 addition & 0 deletions roles/upgrade/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Additionally a list of any non-Red Hat RPM packages that were installed on the s
| async_poll_interval | 60 | Variable used to set the asynchronous task polling internal value (in seconds)
| check_leapp_analysis_results| true | Allows for running remediation and going straight to upgrade without re-running analysis. |
| post_upgrade_update | true | Boolean to decide if after the upgrade is performed a dnf update will run|
| kernel_modules_to_unload_before_upgrade | [] | A list of kernel modules to be unloaded prior to running leapp. |

## Satellite variables

Expand Down
1 change: 1 addition & 0 deletions roles/upgrade/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,5 @@ async_poll_interval: 60

check_leapp_analysis_results: true

kernel_modules_to_unload_before_upgrade: []
...
4 changes: 4 additions & 0 deletions roles/upgrade/tasks/leapp-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
"{{ repo_files_to_remove_at_upgrade }}"
when: leapp_upgrade_type == "custom"

- name: leapp-upgrade | Include rmmod-kernel-modules.yml
ansible.builtin.include_tasks: rmmod-kernel-modules.yml
loop: "{{ kernel_modules_to_unload_before_upgrade }}"

- name: leapp-upgrade | Block to rescue leapp failures to collect errors
block:
- name: leapp-upgrade | Start Leapp OS upgrade
Expand Down
4 changes: 4 additions & 0 deletions roles/upgrade/tasks/redhat-upgrade-tool-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
state: present
when: leapp_upgrade_type == "custom"

- name: redhat-upgrade-tool-upgrade | Include rmmod-kernel-modules.yml
ansible.builtin.include_tasks: rmmod-kernel-modules.yml
loop: "{{ kernel_modules_to_unload_before_upgrade }}"

# --cleanup-post removes Red Hat signed RHEL 6 packages and in theory should be safe.
- name: redhat-upgrade-tool-upgrade | Run redhat-upgrade-tool
ansible.builtin.shell: >
Expand Down
7 changes: 7 additions & 0 deletions roles/upgrade/tasks/rmmod-kernel-modules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- name: rmmod-kernel-modules | Unload module {{ item }}
community.general.modprobe:
name: "{{ item }}"
state: absent

...

0 comments on commit 87e259f

Please sign in to comment.