Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionJoniel Pasqualetto
2022-03-03 17:30:17 UTC
Document URL:
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.10/html-single/api_guide/index#sect-API_Guide-Uploading_Content_to_the_Satellite_Server
Section Number and Name:
5.3. Uploading Content to the Satellite Server
Describe the issue:
The instructions in this section worked fine until Satellite 6.9. With the change to pulp3 in Satellite 6.10 they are no longer working and need adjustments.
Suggestions for improvement:
We need the sha256sum of the package for this to work and to specify the name of the package as a parameter later on the process:
Example:
The package I'm uploading is /root/ssl-build.bkp/import-export-sat.usersys.redhat.com/import-export-sat.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch.rpm
Checksum:
# sha256sum /root/ssl-build.bkp/import-export-sat.usersys.redhat.com/import-export-sat.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch.rpm
1f21412545e82715c7c795455cf201334dbde950ff31037867f33007b26430c9 /root/ssl-build.bkp/import-export-sat.usersys.redhat.com/import-export-sat.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch.rpm
Size
# ls -l /root/ssl-build.bkp/import-export-sat.usersys.redhat.com/import-export-sat.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch.rpm
-rw-------. 1 root root 12542 Jan 11 13:55 /root/ssl-build.bkp/import-export-sat.usersys.redhat.com/import-export-sat.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch.rpm
[root@import-export-sat ~]#
Get the upload_id (using size + checksum):
# curl -H 'Content-Type: application/json' -X POST -k -u admin:password -d '{"size": 12542, "checksum": "1f21412545e82715c7c795455cf201334dbde950ff31037867f33007b26430c9"}' https://$(hostname -f)/katello/api/repositories/76/content_uploads
{"upload_id":"f0a5882e-b76e-4813-b4ab-f8880fcb9138"}
Upload the file itself:
# curl -u admin:redhat -H Accept:application/json -H Content-Type:multipart/form-data -X PUT --data-urlencode size=12542 --data-urlencode offset=0 --data-urlencode content@/root/ssl-build.bkp/import-export-sat.usersys.redhat.com/import-export-sat.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch.rpm https://$(hostname -f)/katello/api/v2/repositories/76/content_uploads/f0a5882e-b76e-4813-b4ab-f8880fcb9138
Finish the import (also using size + checksum + name):
# curl -H "Content-Type:application/json" -X PUT -u admin:password -k -d '{"uploads":[{"id": "f0a5882e-b76e-4813-b4ab-f8880fcb9138", "name": "import-export-sat.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch.rpm", "checksum": "1f21412545e82715c7c795455cf201334dbde950ff31037867f33007b26430c9" }]}' https://$(hostname -f)/katello/api/v2/repositories/76/import_uploads
Additional information:
I realized I opened a duplicate bug:
Bug 2068453 - "Uploading Content to the Satellite Server" has multiple issues in commands
I will close the mine as it is a newer one, but I think it has more precise steps what & how to change in docs.