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

[BUG] yumpkg.services_need_restart needlessly fails on recent Fedora #67177

Open
3 of 9 tasks
nf-brentsaner opened this issue Jan 18, 2025 · 1 comment
Open
3 of 9 tasks
Labels
Bug broken, incorrect, or confusing behavior needs-triage

Comments

@nf-brentsaner
Copy link

Description
Fedora 41 uses DNF5.

The _yum() function in salt/modules/yumpkg.py returns dnf5.

However, the check in services_need_restart() only accounts for dnf, despite the command working fine in DNF 5 (dnf5), and needlessly fails:

# sha512sum `which dnf` ; sha512sum `which dnf5`
8ff23f3049841d00dab2861710717bc56a841f2754c469edffad2cd52c8219a75a6bec120cc7d5ce7762f7c407a87ccccdc1e80bc93dc97150d507feba0e942c  /usr/bin/dnf
8ff23f3049841d00dab2861710717bc56a841f2754c469edffad2cd52c8219a75a6bec120cc7d5ce7762f7c407a87ccccdc1e80bc93dc97150d507feba0e942c  /usr/bin/dnf5
# dnf --quiet needs-restarting
No core libraries or services have been updated since boot-up.
Reboot should not be necessary.
# dnf5 --quiet needs-restarting
No core libraries or services have been updated since boot-up.
Reboot should not be necessary.

Setup
Fedora 41 running Salt Minion 3007.1.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)
  • VM running on a cloud service, please be explicit and add details
  • container (Kubernetes, Docker, containerd, etc. please specify)
  • or a combination, please be explicit
  • jails if it is FreeBSD
  • classic packaging
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior
N/A

Expected behavior
yumpkg properly detects dnf5 with the same consideration and condition path as dnf in services_need_restart() instead of raising CommandExecutionError("dnf is required to list outdated services.").

Screenshots
N/A

Versions Report
N/A; see above.

Additional context
N/A

@nf-brentsaner nf-brentsaner added Bug broken, incorrect, or confusing behavior needs-triage labels Jan 18, 2025
@ScriptAutomate
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants