Bug 1416904 - regression - Unable to upload packages to a repository
Summary: regression - Unable to upload packages to a repository
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.2.7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: jcallaha
URL:
Whiteboard:
Depends On:
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker
TreeView+ depends on / blocked
 
Reported: 2017-01-26 18:27 UTC by Roman Plevka
Modified: 2020-06-11 13:14 UTC (History)
14 users (show)

Fixed In Version: tfm-rubygem-katello-3.0.0.95-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-30 15:36:38 UTC
Target Upstream Version:


Attachments (Terms of Use)
verification screenshot 1 (59.86 KB, image/png)
2017-01-27 20:58 UTC, jcallaha
no flags Details
verification screenshot 2 (45.86 KB, image/png)
2017-01-27 20:58 UTC, jcallaha
no flags Details
verification screenshot 3 (40.52 KB, image/png)
2017-01-27 20:58 UTC, jcallaha
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18272 0 None None None 2017-01-26 19:31:39 UTC
Red Hat Product Errata RHBA-2017:0209 0 normal SHIPPED_LIVE Satellite Async Errata 2017-01-30 20:36:14 UTC

Description Roman Plevka 2017-01-26 18:27:30 UTC
Description of problem:

REGRESSION
uploading a package to a repository does not work on any of API, CLI or UI on 6.2.7-snap3.
The task seems to be started and finishes successfully, however there are no pacakges listed afterwards.
The package was not found in '/var/lib/pulp/content/units/rpm'

2017-01-25 21:20:05 - nailgun.client - DEBUG - Making HTTP POST request to https://sat6.com/katello/api/v2/repositories/228/upload_content with options {'files': {'content': <open file '/home/jenkins/workspace/automation-6.2-tier2-rhel6/tests/foreman/data/which-2.19-6.el6.x86_64.rpm', mode 'rb' at 0x7fc787920420>}, 'verify': False, 'auth': ('admin', 'changeme')} and no data.

2017-01-25 21:20:08 - nailgun.client - DEBUG - Received HTTP 200 response: {"status":"success"}

2017-01-25 21:20:08 - nailgun.client - DEBUG - Making HTTP GET request to https://sat6.com/katello/api/v2/repositories/228 with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}} and no data.

2017-01-25 21:20:08 - nailgun.client - DEBUG - Received HTTP 200 response:   {"content_type":"yum","docker_upstream_name":null,"mirror_on_sync":true,"unprotected":true,"full_path":"http://sat6.com/pulp/repos/hBXlZI/Library/custom/iDqFRJmT/vyjZMXtpiv/","checksum_type":null,"container_repository_name":null, ,"download_policy":"immediate","url":"http://inecas.fedorapeople.org/fakerepos/zoo3/","relative_path":"hBXlZI/Library/custom/iDqFRJmT/vyjZMXtpiv","major":null,"minor":null,"gpg_key_id":null,"content_id":"1485397204749","content_view_version_id":194,"library_instance_id":null,"product_type":"custom","promoted":false,"ostree_branches":[],"organization":{"name":"hBXlZI","label":"hBXlZI","id":154},"created_at":"2017-01-26 02:20:03 UTC","updated_at":"2017-01-26 02:20:05 UTC","id":228,"name":"vyjZMXtpiv","label":"vyjZMXtpiv","product":{"id":48,"cp_id":"1485396787458","name":"iDqFRJmT","sync_plan":["name","description","sync_date","interval","next_sync"]},"last_sync":null,"content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_tag":0,"rpm":0,"package":0,"package_group":0,"erratum":0,"puppet_module":0},"last_sync_words":null,"gpg_key":null,"environment":{"id":148},"permissions":{"deletable":true}}


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Justin Sherrill 2017-01-26 19:31:37 UTC
Created redmine issue http://projects.theforeman.org/issues/18272 from this bug

Comment 3 pm-sat@redhat.com 2017-01-26 23:04:38 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18272 has been resolved.

Comment 8 jcallaha 2017-01-27 20:57:24 UTC
Verification work shows the upload functionality is back in a functional state.

Steps
-----
1. Create a custom product
2. Create a new yum/puppet/file repository
3. Navigate into the repository details, and click the 'Choose Files' button.
4. Select one or more file(s) to upload.
5. Click the 'Upload' button.
6. Verify that all valid packages were uploaded.

Results
-------
All valid content for yum, puppet, and file type repositories were successfully uploaded. See attached screenshots for UI confirmation, and well as example hammer successes below. 

-- RHEL 6 --
-bash-4.1# hammer -u admin -p changeme repository upload-content --id 1 --product-id 1 --path facter-2.4.6-3.el7sat.x86_64.rpm
Successfully uploaded file 'facter-2.4.6-3.el7sat.x86_64.rpm'.

-- RHEL 7 --
-bash-4.2# hammer -u admin -p changeme repository upload-content --id 66 --product-id 432 --path facter-2.4.6-3.el7sat.x86_64.rpm 
Successfully uploaded file 'facter-2.4.6-3.el7sat.x86_64.rpm'.


Example of successful multiple package upload routed through API
2017-01-27 21:01:33 [app] [I] Started POST "/katello/api/v2/repositories/1/upload_content" for 10.10.116.74 at 2017-01-27 21:01:33 +0100
2017-01-27 21:01:33 [app] [I] Processing by Katello::Api::V2::RepositoriesController#upload_content as HTML
2017-01-27 21:01:33 [app] [I]   Parameters: {"content"=>[#<ActionDispatch::Http::UploadedFile:0x007fb8e94b7590 @tempfile=#<Tempfile:/tmp/RackMultipart20170127-23736-17njxuy>, @original_filename="python-gofer-2.7.6-1.el7sat.noarch (1).rpm", @content_type="application/x-rpm", @headers="Content-Disposition: form-data; name=\"content[]\"; filename=\"python-gofer-2.7.6-1.el7sat.noarch (1).rpm\"\r\nContent-Type: application/x-rpm\r\n">, #<ActionDispatch::Http::UploadedFile:0x007fb8e94b7568 @tempfile=#<Tempfile:/tmp/RackMultipart20170127-23736-1xdyqg>, @original_filename="python-gofer-proton-2.7.6-1.el7sat.noarch.rpm", @content_type="application/x-rpm", @headers="Content-Disposition: form-data; name=\"content[]\"; filename=\"python-gofer-proton-2.7.6-1.el7sat.noarch.rpm\"\r\nContent-Type: application/x-rpm\r\n">, #<ActionDispatch::Http::UploadedFile:0x007fb8e94b7540 @tempfile=#<Tempfile:/tmp/RackMultipart20170127-23736-1py11bz>, @original_filename="python-gofer-2.7.6-1.el7sat.noarch.rpm", @content_type="application/x-rpm", @headers="Content-Disposition: form-data; name=\"content[]\"; filename=\"python-gofer-2.7.6-1.el7sat.noarch.rpm\"\r\nContent-Type: application/x-rpm\r\n">, #<ActionDispatch::Http::UploadedFile:0x007fb8e94b7518 @tempfile=#<Tempfile:/tmp/RackMultipart20170127-23736-zjm64p>, @original_filename="puppet-3.8.6-2.el7sat.noarch.rpm", @content_type="application/x-rpm", @headers="Content-Disposition: form-data; name=\"content[]\"; filename=\"puppet-3.8.6-2.el7sat.noarch.rpm\"\r\nContent-Type: application/x-rpm\r\n">, #<ActionDispatch::Http::UploadedFile:0x007fb8e94b74f0 @tempfile=#<Tempfile:/tmp/RackMultipart20170127-23736-m3u7qr>, @original_filename="pulp-rpm-handlers-2.8.7.5-1.el7sat.noarch.rpm", @content_type="application/x-rpm", @headers="Content-Disposition: form-data; name=\"content[]\"; filename=\"pulp-rpm-handlers-2.8.7.5-1.el7sat.noarch.rpm\"\r\nContent-Type: application/x-rpm\r\n">, #<ActionDispatch::Http::UploadedFile:0x007fb8e94b74c8 @tempfile=#<Tempfile:/tmp/RackMultipart20170127-23736-1rijyih>, @original_filename="pulp-puppet-tools-2.8.7.1-1.el7sat.noarch.rpm", @content_type="application/x-rpm", @headers="Content-Disposition: form-data; name=\"content[]\"; filename=\"pulp-puppet-tools-2.8.7.1-1.el7sat.noarch.rpm\"\r\nContent-Type: application/x-rpm\r\n">, #<ActionDispatch::Http::UploadedFile:0x007fb8e94b74a0 @tempfile=#<Tempfile:/tmp/RackMultipart20170127-23736-4zxf50>, @original_filename="libtasn1-3.8-3.el7.x86_64.rpm", @content_type="application/x-rpm", @headers="Content-Disposition: form-data; name=\"content[]\"; filename=\"libtasn1-3.8-3.el7.x86_64.rpm\"\r\nContent-Type: application/x-rpm\r\n">, #<ActionDispatch::Http::UploadedFile:0x007fb8e94b7478 @tempfile=#<Tempfile:/tmp/RackMultipart20170127-23736-vnrwfv>, @original_filename="katello-agent-2.5.0-5.el7sat.noarch.rpm", @content_type="application/x-rpm", @headers="Content-Disposition: form-data; name=\"content[]\"; filename=\"katello-agent-2.5.0-5.el7sat.noarch.rpm\"\r\nContent-Type: application/x-rpm\r\n">], "authenticity_token"=>"rlSm5spyM/oSS4HNtspKIELKFYF//64fomyVnzQBkEE=", "api_version"=>"v2", "id"=>"1"}
2017-01-27 21:01:38 [app] [I] Completed 200 OK in 5231ms (Views: 0.4ms | ActiveRecord: 24.9ms)


Package versions tested
-----------------------
-- RHEL 6 --
tfm-rubygem-foreman-redhat_access noarch 1.0.15-1.el6sat
tfm-rubygem-katello               noarch 3.0.0.95-1.el6sat
tfm-rubygem-rbovirt               noarch 0.0.38-1.el6sat
tfm-rubygem-redhat_access_lib     noarch 1.0.6-1.el6sat

-- RHEL 7 --
tfm-rubygem-foreman-redhat_access noarch 1.0.15-1.el7sat
tfm-rubygem-katello               noarch 3.0.0.95-1.el7sat
tfm-rubygem-katello_ostree        noarch 3.0.0.95-1.el7sat
tfm-rubygem-redhat_access_lib     noarch 1.0.6-1.el7sat

Comment 9 jcallaha 2017-01-27 20:58:02 UTC
Created attachment 1245270 [details]
verification screenshot 1

Comment 10 jcallaha 2017-01-27 20:58:24 UTC
Created attachment 1245271 [details]
verification screenshot 2

Comment 11 jcallaha 2017-01-27 20:58:54 UTC
Created attachment 1245272 [details]
verification screenshot 3

Comment 12 jcallaha 2017-01-27 21:13:35 UTC
Additionally, the uploaded content is present in the filesystem

Uploaded rpm content on the filesystem
--------------------------------------
-bash-4.1# pwd
/var/lib/pulp/published/yum/http/repos/Default_Organization/Library/custom/test_upload/test_before
-bash-4.1# ls
facter-2.4.6-3.el7sat.x86_64.rpm         pulp-puppet-tools-2.8.7.1-1.el7sat.noarch.rpm  python-gofer-2.7.6-1.el7sat.noarch.rpm
katello-agent-2.5.0-5.el7sat.noarch.rpm  pulp-rpm-handlers-2.8.7.5-1.el7sat.noarch.rpm  python-gofer-proton-2.7.6-1.el7sat.noarch.rpm
libtasn1-3.8-3.el7.x86_64.rpm            puppet-3.8.6-2.el7sat.noarch.rpm               repodata


Uploaded puppet content on the filesystem
-----------------------------------------
-bash-4.2# pwd
/var/lib/pulp/uploads
-bash-4.2# ll
total 192K
-rw-r--r--. 1 apache apache 34K Jan 27 21:32 puppetlabs-apt-1.4.2.tar.gz
-rw-r--r--. 1 apache apache 18K Jan 27 21:32 puppetlabs-concat-1.0.2.tar.gz
-rw-r--r--. 1 apache apache 24K Jan 27 21:32 puppetlabs-inifile-1.0.3.tar.gz
-rw-r--r--. 1 apache apache 60K Jan 27 21:32 puppetlabs-postgresql-3.3.3.tar.gz
-rw-r--r--. 1 apache apache 20K Jan 27 21:32 puppetlabs-reboot-0.1.5.tar.gz
-rw-r--r--. 1 apache apache 32K Jan 27 21:32 puppetlabs-registry-1.0.0.tar.gz

Uploaded file content on the filesystem
---------------------------------------
-bash-4.1# pwd
/var/lib/pulp/published/http/isos/Default_Organization-test_upload-test_file
-bash-4.1# ls
6-2 vdc.zip  esx.conf  PULP_MANIFEST  testvirt.json  testvirt.txt

Comment 13 jcallaha 2017-01-28 16:49:31 UTC
Verified in Satellite 6.2.7 Async packages outlined in #8, based on the results outlined in #8 and #12.

Comment 15 errata-xmlrpc 2017-01-30 15:36:38 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-2017:0209


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