Skip to content

Drive module_hotfixes workaround from a package pattern list - #222

Merged
anfimovdm merged 1 commit into
clfrom
module-hotfixes-pkg-list
Sep 18, 2026
Merged

anfimovdm merged 1 commit into
clfrom
module-hotfixes-pkg-list

Conversation

@anfimovdm

@anfimovdm anfimovdm commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Problem

An ALTS test task for percona-server-shared-8.0.46-37.1.el8.tuxcare.els1.1789656571.5.1 on almalinux:8 failed with:

All matches were filtered out by modular filtering for argument:
percona-server-shared-8.0.46-37.1.el8.tuxcare.els1.1789656571.5.1

The package is not modular, has no .module+el8 dist tag, and lives in a -br build repo that ships no modular metadata.

Root cause

libdnf's setModuleExcludes filters the sack with HY_PKG_PROVIDES against the set of module artifact names — not with HY_PKG_NAME. Any package that provides a name owned by a module stream is hidden unless it belongs to the active stream, or its repo is marked module_hotfixes=1.

percona-server-shared provides mysql-libs, an artifact of the mysql:8.0 module (default, active on AlmaLinux 8). That alone is enough to hide it.

Reproduced in a container with the task's repo set — querying the sack directly:

ignore_all      -> percona-server-shared-8.0.46-... @...-CL8-br
ignore_regular  -> []                          # not a regular exclude
ignore_modular  -> percona-server-shared-...    # reappears
default         -> []

Exactly 5 of the 9 packages in the build repo are excluded — percona-server-client, -devel, -server, -shared, -test — because they provide mysql, mysql-devel, mysql-server, mysql-libs and mysql-test. The 4 that install fine (percona-icu-data-files, percona-mysql-router, percona-server-rocksdb, percona-server-shared-compat) provide no module-owned name. No modular metadata in any enabled repo mentions percona at all.

The role already had this workaround, but gated on pkg_name.startswith('MariaDB'), so percona never matched. MariaDB-shared was caught for the same underlying reason — it also provides mysql-libs.

Change

Replace the MariaDB-specific check with a module_hotfixes_pkg_patterns list in the role defaults (^MariaDB, ^percona-). Adding a future offender is a one-line change. The module_name is not defined guard is kept, so genuine module tests that run dnf module enable are unaffected — module_hotfixes=1 would hide the repo's modular metadata from dnf module enable.

The length > 0 guard matters: with an empty list the alternation would collapse to (?:) and match every package.

Testing

  • Expression evaluated through ansible-playbook with real inputs: percona-server-shared-... and MariaDB-shared-10.6.21-1.el8 match; alt-php74-common, lve-utils, cl-mysql-meta do not.
  • ansible-playbook --syntax-check resources/playbook.yml passes.
  • Fix verified in the container: module_hotfixes=1 on the -br repo turns the failure into a resolved transaction (percona-server-shared + percona-server-shared-compat, compat-openssl10, make).

Known residual risk

The patterns are anchored on package names, but the real trigger is Provides. A future package providing a module-owned name (mysql*, mariadb*, php*, nodejs*, perl*) will hit this again under an unpredictable name. The blunter alternative — always set module_hotfixes=1 on -br repos on EL8 when no module is under test — removes the guessing entirely, since build repos are never modular. Worth deciding separately.

Jira: PF-3303

🤖 Generated with Claude Code

On EL8 libdnf applies modular filtering by Provides, not by package name,
so a non-modular package that provides a name owned by a module stream is
hidden even when it carries no modularity metadata of its own. That is why
percona-server-shared (Provides: mysql-libs, owned by mysql:8.0) failed to
install with "All matches were filtered out by modular filtering".

Replace the hardcoded MariaDB check with module_hotfixes_pkg_patterns in
the role defaults, so further affected packages are a one-line addition.
@anfimovdm
anfimovdm merged commit 880488b into cl Sep 18, 2026
1 of 4 checks passed
@anfimovdm
anfimovdm deleted the module-hotfixes-pkg-list branch September 18, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant