Bug 1286803

Summary: repomd.xml parsing fails when an empty revision tag is present
Product: Red Hat Satellite Reporter: Karl Abbott <kabbott>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.5CC: andrew.schofield, bbuckingham, bkearney, bmbouter, daviddavis, dkliban, ebeaudoi, ggainey, ipanova, mhrivnak, pcreech, rchan, rplevka, sthirugn, ttereshc, xdmoon
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1332922 (view as bug list) Environment:
Last Closed: 2016-07-27 09:20:58 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:
Bug Depends On:    
Bug Blocks: 1332922    

Description Karl Abbott 2015-11-30 18:56:11 UTC
The NSA SIMP 5.1.X repodata contains a <revision /> tag which busts sync
with the following splat:

Downloading metadata from https://dl.bintray.com/simp/5.1.X/.
 Starting new HTTPS connection (1): dl.bintray.com
 Parsing metadata.
  sync failed
  Traceback (most recent call last):
    File ".../sync.py", line 142, in run
      metadata_files = self.get_metadata()
    File ".../sync.py", line 226, in get_metadata
      metadata_files.parse_repomd()
    File ".../metadata.py", line 165, in parse_repomd
      self.revision = int(element.text)
  TypeError: int() argument must be a string or a number, not 'NoneType'

Comment 2 pulp-infra@redhat.com 2015-11-30 19:29:34 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 3 pulp-infra@redhat.com 2015-11-30 19:29:36 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2016-02-23 21:00:39 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 7 pulp-infra@redhat.com 2016-03-23 19:01:10 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 9 Roman Plevka 2016-04-07 15:03:40 UTC
VERIFIED

on sat6.2.0 snap6.2


- modified repomd.xml to contain <revision/>


# hammer repository create --product-id=13 --content-type=yum --name=my_repo_1 --url="https://rplevka.fedorapeople.org/fakerepo02/"
[Foreman] Password for admin: 
Repository created

# hammer repository synchronize --organization-id=1 --product-id=13 --name my_repo_1
[Foreman] Password for admin: 
[...........................................................................................................................] [100%]
No new packages.

# hammer repository info --id 3
[Foreman] Password for admin: 
ID:                 3
Name:               my_repo_1
Label:              my_repo_1
Organization:       Default Organization
Red Hat Repository: no
Content Type:       yum
Checksum Type:      sha256
URL:                https://rplevka.fedorapeople.org/fakerepo02/
Publish Via HTTP:   yes
Published At:       http://sat6server/pulp/repos/Default_Organization/Library/custom/my_product_1/my_repo_1
Relative Path:      Default_Organization/Library/custom/my_product_1/my_repo_1
Download Policy:    immediate
Product:            
    ID:   13
    Name: my_product_1
GPG Key:            

Sync:               
    Status:         Success
    Last Sync Date: 2 minutes
Created:            2016/04/07 14:57:42
Updated:            2016/04/07 14:59:35
Content Counts:     
    Packages:       3
    Package Groups: 0

Comment 12 errata-xmlrpc 2016-07-27 09:20:58 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/RHBA-2016:1501