Errata associated to a repo and errata in updateinfo.xml do not match. pulp version: pulp-0.0.172-1.fc14 $ pulp-admin errata list --repoid=rhel-i386-client-5 +------------------------------------------+ Available Errata in Repo [rhel-i386-client-5] +------------------------------------------+ RHBA-2011:0454 , RHBA-2011:0430 , RHBA-2011:0287 $ grep '<id>' /var/lib/pulp/repos/rhel-i386-client-5/updateinfo.xml <id>RHBA-2011:0287</id> <id>RHBA-2011:0287</id> <id>RHBA-2011:0287</id> ^^^ always replaces all errata with the last uploaded
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.