Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1600906 - hammer repository upload-content fails when uploading larger files
Summary: hammer repository upload-content fails when uploading larger files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Repositories
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Sanket Jagtap
URL:
Whiteboard:
Depends On:
Blocks: 1572297 1582318
TreeView+ depends on / blocked
 
Reported: 2018-07-13 10:44 UTC by Ivan Necas
Modified: 2019-04-01 20:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:20:13 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 24249 None None None 2018-07-13 10:54:18 UTC

Description Ivan Necas 2018-07-13 10:44:32 UTC
Description of problem:

hammer repository upload-content fails when uploading larger files

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

How reproducible:
always

Steps to Reproduce:
1. have a larger file (10MB+)
2. hammer repository upload-content --name image --product RHVH --organization "Default Organization" --path myfile.img 

Actual results:
warning: Overriding "Content-Type" header "multipart/form-data" with "multipart/form-data; boundary=----RubyFormBoundaryueJ8T7XEKh2BLjan" due to payload
Failed to upload file 'squashfs-1.img' to repository. Please check the file and try again.

Expected results:
Successfully uploaded file 'myfile.img'

Additional info:

Pulp produced this error message:

Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: Unhandled Exception
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920) Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE.
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920) Traceback (most recent call last):
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)   File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
Jul 12 16:20:03 sat-6-4-qa-rhel7 pulp: pulp.server.webservices.middleware.exception:ERROR: (1125-57920)     response = wrapped_callback(request, *callback_args, **callback_kwargs)

Seems like the limit on the maximum file size changed between django releases, currently limiting the size to something around 2.5 MB:

cat /usr/lib/python2.7/site-packages/django/conf/global_settings.py | grep DATA_UPLOAD_MAX_MEMORY_SIZE
DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440  # i.e. 2.5 MB

We need to update hammer to conform to this size (the chunk size there is 4 000 000 bytes at the moment.

Additional issue is the warning: Overriding "Content-Type" header "multipart/form-data" with "multipart/form-data; boundary=----RubyFormBoundaryueJ8T7XEKh2BLjan" due to payload - this seems to be an issue in rest-client: until it's fixed properly in there, we should suppress the warning, which is very confusing to the user.

Comment 2 Ivan Necas 2018-07-13 10:54:16 UTC
Created redmine issue https://projects.theforeman.org/issues/24249 from this bug

Comment 4 pm-sat@redhat.com 2018-07-17 14:01:51 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/24249 has been resolved.

Comment 5 Sanket Jagtap 2018-07-24 06:55:45 UTC
Build :Satellite 6.3.0 snap13

[root@qe-testing-rhel7 ~]# hammer repository upload-content --name "$REPO" --product "$PRODUCT" --organization "$ORG" --path "$IMG_PATH"
Successfully uploaded file 'squashfs.img'

hammer> repository info --id 7 --organization-id 1
ID:                 7
Name:               image
Label:              image
Organization:       Default Organization
Red Hat Repository: no
Content Type:       file
Mirror on Sync:     yes
URL:                
Publish Via HTTP:   yes
Published At:       http://sat-host/pulp/isos/Default_Organization/Library/custom/RHVH/image/
Relative Path:      Default_Organization/Library/custom/RHVH/image
Product:            
    ID:   40
    Name: RHVH
GPG Key:            

Sync:               
    Status: Not Synced
Created:            2018/07/24 05:57:18
Updated:            2018/07/24 05:57:20
Content Counts:     
    Files: 1

Comment 6 Bryan Kearney 2018-10-16 19:20: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-2018:2927


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