Bug #23696
closedUnable to upload saved image to docker repository
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1582318
Description of problem:
Attempts to upload an image to a docker repository, via hammer, fail with the following error.
warning: Overriding "Content-Type" header "multipart/form-data" with "multipart/form-data; boundary=----RubyFormBoundarydCoPATBR1CWd12eF" due to payload
Failed to upload file 'chd-sles12.tar' to repository. Please check the file and try again.
Version-Release number of selected component (if applicable):
Satellite 6.4 Snap 4
How reproducible:
Always
Steps to Reproduce:
1. Use skopeo copy to save an image to your local filesystem. This can be from any v2 registry.
- skopeo copy docker://myserver.com:5000/default_organization-docker-chd:sles12 dir:/root/images/
2. package those contents into a tar
- tar -cvf ../chd-sles12.tar *
3. create a new docker type repository
4. upload the tar to the repository
- hammer repository upload-content --path /root/chd-sles12.tar --id 41 --organization-id 1
Actual results:
The error above is shown.
Expected results:
The tar uploads successfully and all image details are shown in satellite.
Full Steps With Output
----------------------
-bash-4.2# skopeo copy docker://myserver.com:5000/default_organization-docker-chd:sles12 dir:/root/images/ --dest-compress
Getting image source signatures
Copying blob sha256:15e57e8ae08d4063266dd6190e51d5f7c6a1ddac075a3b4cf03231aaadcf0706
43.27 MB / 43.27 MB [======================================================] 0s
Copying blob sha256:44857127ee12372e7b85c7ae7e7e1ef0d834f01e12382da9600abb60896aff41
92.68 MB / 92.68 MB [======================================================] 1s
Copying blob sha256:12a7da97e70b49a042123c35eeeb870d0be27353a0fa5b5a8ecdb0d39d8f1d3c
26.12 MB / 26.12 MB [======================================================] 0s
Copying blob sha256:cc7814dc0e1e97f58b9f48b163943f74741af82df40e09096f3531be22532e16
3.84 KB / 3.84 KB [========================================================] 0s
Copying blob sha256:89d826c2ce74d7df53f3e2240b06b05ad5577b95c86775e7665db9acddd116ba
779 B / 779 B [============================================================] 0s
Copying blob sha256:8fa08ad64bf2d5890909d3420120cad8ee418352a8f7533828b38cfd3b7b5bb0
459 B / 459 B [============================================================] 0s
Copying blob sha256:7b1329066df6ac615438ef54624ad791d449ffe269c521fd437b0c697b57cdb0
779 B / 779 B [============================================================] 0s
Copying config sha256:41eb58b3e82267b834faa2586b6e2d55e850c8cc3e416bbee9b7049b0684a795
3.93 KB / 3.93 KB [========================================================] 0s
Writing manifest to image destination
Storing signatures
bash-4.2# ll. 1 root root 27M May 24 21:25 12a7da97e70b49a042123c35eeeb870d0be27353a0fa5b5a8ecdb0d39d8f1d3c
total 163M
-rw-r--r-rw-r--r-. 1 root root 44M May 24 21:25 15e57e8ae08d4063266dd6190e51d5f7c6a1ddac075a3b4cf03231aaadcf0706rw-r--r-. 1 root root 4.0K May 24 21:25 41eb58b3e82267b834faa2586b6e2d55e850c8cc3e416bbee9b7049b0684a795rw-r--r-. 1 root root 93M May 24 21:25 44857127ee12372e7b85c7ae7e7e1ef0d834f01e12382da9600abb60896aff41rw-r--r-. 1 root root 779 May 24 21:25 7b1329066df6ac615438ef54624ad791d449ffe269c521fd437b0c697b57cdb0rw-r--r-. 1 root root 779 May 24 21:25 89d826c2ce74d7df53f3e2240b06b05ad5577b95c86775e7665db9acddd116barw-r--r-. 1 root root 459 May 24 21:25 8fa08ad64bf2d5890909d3420120cad8ee418352a8f7533828b38cfd3b7b5bb0rw-r--r-. 1 root root 3.9K May 24 21:25 cc7814dc0e1e97f58b9f48b163943f74741af82df40e09096f3531be22532e16rw-r--r-. 1 root root 1.8K May 24 21:25 manifest.jsonrw-r--r-. 1 root root 33 May 24 21:25 version
-bash-4.2# tar -cvf ../chd-sles12.tar *
12a7da97e70b49a042123c35eeeb870d0be27353a0fa5b5a8ecdb0d39d8f1d3c
15e57e8ae08d4063266dd6190e51d5f7c6a1ddac075a3b4cf03231aaadcf0706
41eb58b3e82267b834faa2586b6e2d55e850c8cc3e416bbee9b7049b0684a795
44857127ee12372e7b85c7ae7e7e1ef0d834f01e12382da9600abb60896aff41
7b1329066df6ac615438ef54624ad791d449ffe269c521fd437b0c697b57cdb0
89d826c2ce74d7df53f3e2240b06b05ad5577b95c86775e7665db9acddd116ba
8fa08ad64bf2d5890909d3420120cad8ee418352a8f7533828b38cfd3b7b5bb0
cc7814dc0e1e97f58b9f48b163943f74741af82df40e09096f3531be22532e16
manifest.json
version
-bash-4.2# hammer repository create --name chd-sles12 --content-type docker --product-id 44 --organization-id 1
Repository created
-bash-4.2# hammer repository upload-content --path chd-sles12.tar --id 41 --organization-id 1
warning: Overriding "Content-Type" header "multipart/form-data" with "multipart/form-data; boundary=----RubyFormBoundaryzUNYGqCR1VAQAdUB" due to payload
Failed to upload file 'chd-sles12.tar' to repository. Please check the file and try again.