Bug 1106860

Summary: Unable to add large RPMs into spacewalk
Product: [Community] Spacewalk Reporter: blingall
Component: ServerAssignee: Michael Mráka <mmraka>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.2CC: ggainey
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-14 19:03:30 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: 1207293    

Description blingall 2014-06-09 17:58:04 UTC
Description of problem:
We are unable to add large RPMs into our repos.

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


How reproducible:


Steps to Reproduce:
1. Create 5GB+ RPM
2. Check to make sure ARCHIVESIZE is set to None
     rpm -q -p test.rpm --queryformat ARCHIVESIZE:%{ARCHIVESIZE}
3. Attempt to add


Actual results:
Errors out say


Expected results:
RPM added into spacewalk.

Additional info:
I think the issue appears because of this line...
https://github.com/spacewalkproject/spacewalk/blob/SPACEWALK-2.0/backend/server/importlib/headerSource.py#L63



When the loop gets to the payload_size / archive_size we get a python error as val is set to None.
When you have a large RPM the archive size seems to be set to none -- then LONGARCHIVESIZE is set to the larger size. It looks like spacewalk is set to only check ARCHIVESIZE which for large RPMS is set to (none).

Comment 1 blingall 2014-06-09 18:20:16 UTC
Exception Handler Information
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheUploadServer.py", line 100, in _wrapper
    ret = function(req)
  File "/usr/share/rhn/upload_server/handlers/package_push/package_push.py", line 125, in handler
    relative_path=self.rel_package_path, org_id=self.org_id)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/rhnPackageUpload.py", line 130, in push_package
    header_end=a_pkg.header_end, channels=channels)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/mpmSource.py", line 224, in create_package
    header_end=header_end, channels=channels)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/headerSource.py", line 415, in createPackage
    channels)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/headerSource.py", line 141, in populate
    header_start, header_end)
  File "/usr/lib/python2.6/site-packages/spacewalk/server/importlib/headerSource.py", line 64, in populate
    val = long(val) + 2 ** 32
TypeError: long() argument must be a string or a number, not 'NoneType'

Comment 2 Grant Gainey 2015-03-30 17:27:49 UTC
Fixed as https://github.com/spacewalkproject/spacewalk/pull/133 in Spacewalk-2.3

Comment 3 Grant Gainey 2015-04-14 19:03:30 UTC
Spacewalk 2.3 has been released. See

https://fedorahosted.org/spacewalk/wiki/ReleaseNotes23