Issue #8162
closedsyncing a repo with an erratum without an updated date results in a bad date in published metadata
Description
- create a repo and remote pointing to https://fixtures.pulpproject.org/rpm-advisory-no-update-date/repodata/
- sync the remote, create a publication and distribution
- examine the repodata, look for the Bird erratum section of the updateinfo xml:
<update from="errata@redhat.com" status="stable" type="security" version="1">
<id>RHEA-2012:0056</id>
<title>Bird_Erratum</title>
<issued date="2013-01-27 16:08:08"/>
<updated date="0693-02-18 07:00:00"/>
Note that the date is nonsense. this causes an issue for things trying to consumer this date, such as katello or another pulp server trying to sync
Related issues
Updated by dalley almost 4 years ago
@Justin, do we know of any repositories in the wild where the updated_date field doesn't exist? Basically, is it valid or malformed repodata?
I did some testing and found that while there are deficiencies in Pulp that we can fix, they are not actually the cause of this problem. It looks like createrepo_c has problems with this. I wrote modified one of the createrepo_c test cases and printed the resulting XML and I found the exact same problem.
<update from="from" status="status" type="type" version="version">
<id>id</id>
<title>title</title>
<issued date="2021-01-28 00:59:17"/>
<updated date="6449-03-17 07:00:00"/>
<rights>rights</rights>
<release>release</release>
<pushcount>pushcount</pushcount>
<severity>severity</severity>
<summary>summary</summary>
<description>description</description>
<solution>solution</solution>
<reboot_suggested>True</reboot_suggested>
<references/>
<pkglist/>
</update>
You can see that even though they check whether it's a datetime type or None, they don't actually handle the case where it is None.
If it's valid metadata, the next step would be to file a BZ with createrepo_c.
Updated by dalley almost 4 years ago
It looks like SUSE updateinfo is lacking this field, which makes it valid.
Updated by dalley almost 4 years ago
- Status changed from NEW to POST
- Assignee set to dalley
Updated by pulpbot almost 4 years ago
Added by dalley almost 4 years ago
Updated by dalley almost 4 years ago
- Status changed from POST to MODIFIED
Applied in changeset 84342df6869e5d96374193283b96a0e80e02582f.
Updated by pulpbot almost 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Updated by dalley almost 4 years ago
- Related to Issue #6133: pulp_rpm synchronization failure: day is out of range for month added
Migration to fix some bad updated_date data on advisories
[nocoverage]
closes: #8162 https://pulp.plan.io/issues/8162