Skip to content

Fix pkg.group_installed false failure on unavailable group members (#68210)#69429

Open
dwoz wants to merge 1 commit into
saltstack:3006.xfrom
dwoz:fix/issue-68210
Open

Fix pkg.group_installed false failure on unavailable group members (#68210)#69429
dwoz wants to merge 1 commit into
saltstack:3006.xfrom
dwoz:fix/issue-68210

Conversation

@dwoz

@dwoz dwoz commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Stops pkg.group_installed from reporting failure when a package group
contains 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 include list, matching
the behavior of yum/dnf group install, which reports "No match for
group package " and still exits 0.

What issues does this PR fix or reference?

Fixes #68210

Previous Behavior

On RHEL-family minions, applying

Test Groupinstall:
  pkg.group_installed:
    - name: 'Performance Tools'

would return result: False with
Comment: Failed to install the following packages: pcp-pmda-kvm,
even though dnf -y group install 'Performance Tools' on the same
host 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 manager
itself 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 include packages that are missing after
pkg.install ran. Default/optional members are forgiven, matching the
contract of yum/dnf group install. Mandatory failures still fail the
state, pinned by a companion regression test.

Merge requirements satisfied?

  • Docs (no documented behavior change — the state docstring
    already says it's "essentially a wrapper around pkg.install",
    which is closer to the new behavior than the old)
  • Changelog
  • Tests written/updated

Commits signed with GPG?

No

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant