Bug 980611 - generated updateinfo.xml does not include package epoch
Summary: generated updateinfo.xml does not include package epoch
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: rpm-support
Version: 2.1.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 2.4.0
Assignee: Mike McCune
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On: 1004986 1005282 1005288
Blocks: 950743
TreeView+ depends on / blocked
 
Reported: 2013-07-02 20:48 UTC by Justin Sherrill
Modified: 2014-08-09 06:56 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-09 06:56:13 UTC
Embargoed:


Attachments (Terms of Use)

Description Justin Sherrill 2013-07-02 20:48:02 UTC
Description of problem:

Pulp seems to generate the updateinfo.xml without specifying the epoch for packages: 

      <package arch="noarch" name="dracut-network" release="53.el6_1.1" src="dracut-004-53.el6_1.1.src.rpm" version="004">
        <filename>dracut-network-004-53.el6_1.1.noarch.rpm</filename>
      </package>


Looking in the updateinfo.xml that pulp generates none of the package entires have an epoch field associated with them.

According to this bug:

https://bugzilla.redhat.com/show_bug.cgi?id=958932

this means in pulp's point of view these are invalid and errata cannot be remotely applied properly.



Version-Release number of selected component (if applicable):
2.1.2-0.3

How reproducible:
Always

Steps to Reproduce:
1. Sync a RHEL repo with errata
2. Publish the repo
3. Examine the updateinfo.xml published by pulp

Actual results:
packages should have epoch (at least the packages that actually do have an epoch)

Expected results:
No epoch is specified even for packages that do have an epoch (i think)



Note that the implications of this are that errata installs would fail on systems subscribed to a pulp node as per, since this updateinfo is 'invalid' in the words of bz958932.

Comment 1 Randy Barlow 2013-09-06 03:41:04 UTC
I spent quite a lot of time working on this bug today, and I wanted to write down a few notes as I think I'm going to have to put it down for a while.

1) I believe the cause of this bug is our use of the Yum Python library for generating the updateinfo.xml file. In particular, we use the method yum.update_md.UpdateNotice.xml() to generate this particular XML, and that function omits the epoch from the XML. I am currently working with the Yum team to see if we can get them to accept a patch to include the epoch there. If we can get that, I think everything will be fine, but I am not sure whether or not it will move quickly. Due to that, a child Pulp Node will import errata that omit the epochs, and due to another bug (#1004986) Pulp tries to use "None" as the epoch.

2) I filed #1004986 to address the issue of the missing epoch being translated into None. I believe that will resolve a lot of the symptoms you are experiencing in this bug, but it will not truly resolve the issue, as the updateinfo.xml file will continue to have the epoch data missing. However, The errata will now be translated into a package by Name, Version, Release and Arch, and Yum should select the newest epoch automatically, so I believe the user experience will still be the desired experience.

3) We are about to rewrite our YumDistributor. This may involve reconsidering our use of Yum for this purpose, or possibly getting our fix accepted by upstream. This process will take longer than our 2.3 release cycle, and so I think we will need to push this bug back.

I believe that we can largely relieve the problem you are experiencing by fixing #1004986. Hopefully that will work for MDP2, and then we can fix the underlying issue during our distributor rewrite.

Comment 2 Jason Connor 2013-11-13 20:01:34 UTC
This has been fixed as part of the new yum distributor

Comment 4 Jeff Ortel 2014-04-03 13:35:50 UTC
build: 2.4.0-0.7.beta

Comment 5 Preethi Thomas 2014-06-03 19:33:26 UTC
verified
[root@ibm-x3550m3-08 ~]# rpm -qa pulp-server
pulp-server-2.4.0-0.19.beta.el6.noarch
[root@ibm-x3550m3-08 ~]# 


From rhel6-5 repo 

</package>
<package arch="x86_64" epoch="1" name="NetworkManager" release="5.el6_0.1" src="NetworkManager-0.8.1-5.el6_0.1.src.rpm" version="0.8.1">
<filename>NetworkManager-0.8.1-5.el6_0.1.x86_64.rpm</filename>
<sum type="sha256">
5cf5374cecd88b4ac3eabc20babfc0e25ee049f21dc8ead5e1aa128112f7c0c3
</sum>

Comment 6 Randy Barlow 2014-08-09 06:56:13 UTC
This has been fixed in Pulp 2.4.0-1.


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