Bug 1741011 - pulp can't handle update version as a string in updateinfo.xml
Summary: pulp can't handle update version as a string in updateinfo.xml
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.7.0
Assignee: satellite6-bugs
QA Contact: Bruno Rocha
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-14 05:12 UTC by matt jia
Modified: 2023-09-07 20:24 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 13:25:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 5308 0 Normal CLOSED - CURRENTRELEASE pulp can't handle update version as a string in updateinfo.xml 2019-10-01 14:01:52 UTC
Red Hat Product Errata RHSA-2020:1454 0 None None None 2020-04-14 13:25:27 UTC

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


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