Fix pkg.group_installed false failure on unavailable group members (#68210)#69429
Open
dwoz wants to merge 1 commit into
Open
Fix pkg.group_installed false failure on unavailable group members (#68210)#69429dwoz wants to merge 1 commit into
dwoz wants to merge 1 commit into
Conversation
yum/dnf treat "No match for group package <X>" as a warning and exit 0 when a group declares a package that no enabled repository provides (commonly arch-specific subpackages like pcp-pmda-kvm). The pkg.group_installed state, however, marked the run as failed for every group target missing from pkg.list_pkgs() after install, including those default/optional members the package manager itself skipped. Restrict the post-install missing-package check to mandatory group members and the user-supplied include list, matching the package manager's own success criteria. Fixes saltstack#68210
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Stops
pkg.group_installedfrom reporting failure when a package groupcontains default or optional members that no enabled repository
provides. The post-install missing-package check now only considers
mandatory group members and the user-supplied
includelist, matchingthe behavior of
yum/dnf group install, which reports "No match forgroup package " and still exits 0.
What issues does this PR fix or reference?
Fixes #68210
Previous Behavior
On RHEL-family minions, applying
would return
result: FalsewithComment: Failed to install the following packages: pcp-pmda-kvm,even though
dnf -y group install 'Performance Tools'on the samehost exits 0 (printing only the warning
No match for group package "pcp-pmda-kvm") and the rest of the group's packages get installed.The state's post-install check compared every group target against
pkg.list_pkgs(), so any group member that the package manageritself decided to skip (typically arch-specific subpackages absent
from any enabled repo) flipped the state result to failed.
New Behavior
The state's post-install check now only flags mandatory members and
explicitly user-requested
includepackages that are missing afterpkg.installran. Default/optional members are forgiven, matching thecontract of
yum/dnf group install. Mandatory failures still fail thestate, pinned by a companion regression test.
Merge requirements satisfied?
already says it's "essentially a wrapper around pkg.install",
which is closer to the new behavior than the old)
Commits signed with GPG?
No