Bug 702434
Summary: | incorrect errata in updateinfo.xml | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | Daniel Mach <dmach> |
Component: | z_other | Assignee: | Pradeep Kilambi <pkilambi> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | unspecified | CC: | dgregor, pkilambi |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | Sprint 23 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-08-16 12:10:23 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 563609, 647488 |
Description
Daniel Mach
2011-05-05 16:32:14 UTC
Hmm lemme understand the issue, so you want us to override existing errata in a repo for each upload? or are you saying the upldateinfo.xml is outdated after the addition of new errata? If former, You think that will always be the case? What if I want to add a specific errata to an already existing repo with errata. Seems weird to me to override existing errata in a repo for each upload. If later, did you try forcing a regenerate? also please clearly specify the steps that caused this. Its not clear to me if this is during creation of new errata or during a sync. I just checked a resync and the errata is updated correctly. I created 3 errata (via ErrataAPI) one after another and associated them with a repo (RepoAPI). updateinfo.xml (see the grep results in description) contains one erratum multiple times instead of 3 different errata. That's the problem. 0x RHBA-2011:0454 0x RHBA-2011:0430 3x RHBA-2011:0287 (the last created, probably somehow overrides the previous errata) hmm interesting, this might be a regression because this working in previous builds. I'll look into it, will keep you posted. fixed! commit 379e1beea9c1f9df08942882dc707b6308724a5b Here is the patch if you wanna apply it locally until the next build: --- a/src/pulp/server/updateinfo.py +++ b/src/pulp/server/updateinfo.py @@ -114,13 +114,13 @@ def generate_updateinfo(repo): @type repo: repository object """ um = UpdateMetadata() - un = UpdateNotice() eapi = ErrataApi() if not repo['errata']: #no errata to process, return return errataids = list(chain.from_iterable(repo['errata'].values())) for eid in errataids: + un = UpdateNotice() e = eapi.erratum(eid) _md = { $ sudo pulp-admin repo add_errata --id=testerrata -e RHEA-2011:7777 Successfully added Errata ['RHEA-2011:7777'] to repo [testerrata]. $ grep '<id>' /var/lib/pulp/repos/pub/updates/updateinfo.xml <id>RHEA-2010:9999</id> <id>RHEA-2010:9999</id> After patch: $ sudo pulp-admin repo add_errata --id=testerrata -e RHEA-2011:5555 Successfully added Errata ['RHEA-2011:5555'] to repo [testerrata]. $ grep '<id>' /var/lib/pulp/repos/pub/updates/updateinfo.xml <id>RHEA-2010:9999</id> <id>RHEA-2011:5555</id> <id>RHEA-2011:7777</id> build 0.174 verified [root@preethi unit]# rpm -q pulp pulp-0.0.174-1.fc14.noarch [root@preethi unit]# pulp-admin repo add_errata --id=new-errata-repo -e RHBA-2011-1111 Successfully added Errata ['RHBA-2011-1111'] to repo [new-errata-repo]. [root@preethi unit]# grep '<id>' /var/lib/pulp/repos/new-errata-repo/updateinfo.xml <id>RHBA-2011-1111</id> [root@preethi unit]# [root@preethi unit]# pulp-admin repo add_errata --id=new-errata-repo -e RHBA-2011-1112 Successfully added Errata ['RHBA-2011-1112'] to repo [new-errata-repo]. [root@preethi unit]# grep '<id>' /var/lib/pulp/repos/new-errata-repo/updateinfo.xml <id>RHBA-2011-1111</id> <id>RHBA-2011-1112</id> [root@preethi unit]# pulp-admin repo add_errata --id=new-errata-repo -e RHBA-2011-1113 Successfully added Errata ['RHBA-2011-1113'] to repo [new-errata-repo]. [root@preethi unit]# grep '<id>' /var/lib/pulp/repos/new-errata-repo/updateinfo.xml <id>RHBA-2011-1111</id> <id>RHBA-2011-1112</id> <id>RHBA-2011-1113</id> [root@preethi unit]# Closing with Community Release 15 pulp-0.0.223-4. Closing with Community Release 15 pulp-0.0.223-4. |