RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2007166 - Module yaml error: Unexpected key in data
Summary: Module yaml error: Unexpected key in data
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libdnf
Version: 9.0
Hardware: x86_64
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: amatej
QA Contact: Eva Mrakova
URL:
Whiteboard:
Depends On: 2006669
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-23 09:44 UTC by Petr Pisar
Modified: 2022-05-17 16:22 UTC (History)
12 users (show)

Fixed In Version: libdnf-0.65.0-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of: 2004853
: 2007167 (view as bug list)
Environment:
Last Closed: 2022-05-17 15:55:20 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-98023 0 None None None 2021-09-23 09:45:14 UTC
Red Hat Product Errata RHBA-2022:3959 0 None None None 2022-05-17 15:55:33 UTC

Description Petr Pisar 2021-09-23 09:44:28 UTC
+++ This bug was initially created as a clone of Bug #2004853 +++

Since today (2021-09-16) I am not able to install some packages on a clean install of https://archives.fedoraproject.org/pub/fedora/linux/releases/33/Cloud/x86_64/images/Fedora-Cloud-Base-33-1.2.x86_64.qcow2. It's "clean" in the sense that it's fetched and passed directly to a packer instance which then provisions the entire VM so there's no work done inside the image prior that process. Example:

[root@fedora33-cloud-31864 spdk]# dnf install -y autoconf
[...]
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
Module yaml error: Unexpected key in data: static_context [line 9 col 3]
Dependencies resolved.
[...]
Running transaction check
No available modular metadata for modular package 'perl-AutoLoader-5.74-471.module_f33+12592+71aff0e2.noarch', it cannot be installed on the system
No available modular metadata for modular package 'perl-B-1.80-471.module_f33+12592+71aff0e2.x86_64', it cannot be installed on the system
[...]
Error: No available modular metadata for modular package
[...]

--- Additional comment from Petr Pisar on 2021-09-21 08:28:13 GMT ---

This is caused by DNF which explicitly strictly validates modulemd-v2 documents before using them. 
Since the old libmodulemd 2.9.4 does not recognize static_context field, it reports that the document is not strictly valid and DNF will discard it.
Because DNF discards all documents in a modular repository, it errors with "No available modular metadata for modular package".

DNF needs stop strictly validating the documents. Without strict validation, old libmodulemd will ignore unknown fields and DNF will happily consume them.

You can work around the DNF issues by upgrading libmodulemd first. Then subsequent invocations of DNF will recognize the same documents as valid. Because you use DNF for updating libmodulemd (and dnf, once fixed), you need temporarily disable modular repositories "dnf --disable-repo 'fedora-modular*' upgrade libmodulemd".

[...]

--- Additional comment from  on 2021-09-22 10:41:40 GMT ---

I made a PR that switches off the strict validation for dnf (it is done through libdnf) https://github.com/rpm-software-management/libdnf/pull/1346.

-----

RHEL-9 is affected (libdnf-0.63.0-4.el9).

We need to apply this fix to enable future enhancements of the modulemd-v2 format. Without the fix DNF would leak packages of the new modules into non-modular package set.

Comment 7 errata-xmlrpc 2022-05-17 15:55:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: libdnf), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:3959


Note You need to log in before you can comment on or make changes to this bug.