Bug 1741011

Summary: pulp can't handle update version as a string in updateinfo.xml
Product: Red Hat Satellite Reporter: matt jia <mjia>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Bruno Rocha <rochacbruno>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4.0CC: bmbouter, daviddavis, dkliban, ggainey, ipanova, jjansky, pcreech, rchan, rochacbruno, ttereshc
Target Milestone: 6.7.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:25:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description matt jia 2019-08-14 05:12:21 UTC
Description of problem:

In Satellite 6.3, a updateinfo.xml like this will work

====
<updates>
  <update from="--------------@phoenixspa.it" status="stable" type="security" version="1-25">
    <id>FCSA:2017-0001</id>
    <title>Security Update for fc-proftpd-chroot</title>
    <release>PROFTPD-CHROOT</release>
====

However, this doesn't work in 6.4 as pulp is expecting the version to be a number.


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

6.4
How reproducible:

Easy


Steps to Reproduce:

sync a custom repo with the updatexml.info as above


Actual results:

The sync fails with errors:

=====
Aug 01 11:53:54 example.com pulp[79521]: pulp_rpm.plugins.importers.yum.sync:ERROR: [7f2355a3] (79521-55712)     if not existing_erratum or existing_erratum.update_needed(new_erratum):
Aug 01 11:53:54 example.com pulp[79521]: pulp_rpm.plugins.importers.yum.sync:ERROR: [7f2355a3] (79521-55712)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/db/models.py", line 1253, in update_needed
Aug 01 11:53:54 example.com pulp[79521]: pulp_rpm.plugins.importers.yum.sync:ERROR: [7f2355a3] (79521-55712)     return util.is_version_newer(other.version, self.version)
Aug 01 11:53:54 example.com pulp[79521]: pulp_rpm.plugins.importers.yum.sync:ERROR: [7f2355a3] (79521-55712)   File "/usr/lib/python2.7/site-packages/pulp_rpm/yum_plugin/util.py", line 208, in is_version_newer
Aug 01 11:53:54 example.com pulp[79521]: pulp_rpm.plugins.importers.yum.sync:ERROR: [7f2355a3] (79521-55712)     new = float(new_version)
Aug 01 11:53:54 example.com pulp[79521]: pulp_rpm.plugins.importers.yum.sync:ERROR: [7f2355a3] (79521-55712) ValueError: invalid literal for float(): 1-25
=====


Expected results:

The repo sync should work.
Additional info:

I believe this is a regression.

Comment 6 pulp-infra@redhat.com 2019-08-20 17:02:05 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 7 pulp-infra@redhat.com 2019-08-20 17:02:06 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 8 pulp-infra@redhat.com 2019-08-27 21:02:10 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 9 pulp-infra@redhat.com 2019-08-28 14:02:11 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 10 pulp-infra@redhat.com 2019-08-28 15:32:10 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 11 pulp-infra@redhat.com 2019-08-28 16:01:50 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 12 pulp-infra@redhat.com 2019-10-01 14:01:53 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 13 Bruno Rocha 2020-01-15 21:24:03 UTC
Verified using:
 satellite-6.7.0-4.beta.el7sat.noarch
 pulp-server-2.21.0-1.el7sat.noarch
Using repo fixture: https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-string-version-updateinfo/
Test automated: https://github.com/SatelliteQE/robottelo/pull/7587

Comment 16 errata-xmlrpc 2020-04-14 13:25:13 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, 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/RHSA-2020:1454