Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix purge of unwanted kernels on DNF based machines #309

Merged
merged 1 commit into from Jun 14, 2023

Conversation

traylenator
Copy link

Pull Request (PR) description

Previously when installonly_limit of a node is adjusted then package-cleanup was called to remove unwanted old kernels. This is invalid for dnf based systems and a new command must be used.

This DNF command will remove kernel packages except in two cases:

  • It is the running kernel as determined from $facts['kernelrelease']
  • It is one of last N kernel versions where N is the installonly_limit

This Pull Request (PR) fixes the following issues

Fixes #295

@traylenator traylenator added the bug Something isn't working label May 16, 2023
@traylenator traylenator marked this pull request as draft May 16, 2023 12:50
@traylenator traylenator force-pushed the fix295 branch 2 times, most recently from cc5e9c1 to 8451d39 Compare May 16, 2023 13:27
@traylenator
Copy link
Author

rebase after #308 for fedora test.

@traylenator traylenator marked this pull request as ready for review May 16, 2023 13:35
Previously when `installonly_limit` of a node is adjusted then
`package-cleanup` was called to remove unwanted old kernels.
This is invalid for dnf based systems and a new command must be used.

This DNF command will remove kernel packages except in two cases:
* It is the running kernel as determined from `$facts['kernelrelease']`
* It is one of last N kernel versions where N is the `installonly_limit`

Fixes voxpupuli#295
@traylenator traylenator merged commit 65d19f4 into voxpupuli:master Jun 14, 2023
10 checks passed
@traylenator traylenator deleted the fix295 branch June 14, 2023 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to call refresh: '/usr/bin/package-cleanup --oldkernels --count=2 -y' returned 1 instead of one of [0]
2 participants