Bug 1557101

Summary: Fails to upload custom docker image into Satellite 6.3 repository using hammer CLI.
Product: Red Hat Satellite Reporter: Amit Kumar Das <amdas>
Component: RepositoriesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: hyu, satellite6-bugs, vijsingh, ykawada
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-19 16:51:16 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:

Description Amit Kumar Das 2018-03-16 02:30:30 UTC
Description of problem:

Docker customer image fails to upload in Satellite 6.3 repository using Hammer CLI.

# hammer repository upload-content --product 'containers' --organization 'REDHAT' --name 'rhel-custom' --path /root/my_httpd_rhel.tar
Failed to upload file '' to repository. Please check the file and try again.
Could not upload the content:
  Error: repository not found
 
Version-Release number of selected component (if applicable):
Satellite 6.3

How reproducible:
1) Satellite GUI > Content > Product >
Create Product "containers"
Create Repositories "rhel" 
Content Type "docker" 
Registry url "https://registry.access.redhat.com"
Sync Now

2) Content > Docker Tag > rhel:latest > LifeCycle Environment > Publish At > Copy "my.satellite.com:5000/redhat-dev-containers-containers-rhel:latest"

3) In host
# docker pull my.satellite.com:5000/redhat-dev-containers-containers-rhel:latest
# docker images
# docker run --name my_rhel -it my.satellite.com:5000/redhat-dev-containers-containers-rhel /bin/bash
# docker container attach my_rhel
# yum install httpd
# exit
# docker save -o my_httpd_rhel.tar my.satellite.com:5000/redhat-dev-containers-containers-rhel:latest

Now upload it custom image "my_httpd_rhel.tar" using hammer CLI.

Actual results:

# hammer repository upload-content --product 'containers' --organization 'REDHAT' --name 'rhel-custom' --path /root/my_httpd_rhel.tar
Failed to upload file '' to repository. Please check the file and try again.
Could not upload the content:
  Error: repository not found
 
If I create repository 'rhel-custom' in satellite and try to upload, it gives error:

# hammer repository upload-content --product 'containers' --organization 'REDHAT' --name 'rhel-custom' --path /root/my_httpd_rhel.tar
Failed to upload file 'my_httpd_rhel.tar' to repository. Please check the file and try again

Expected results:
"my_httpd_rhel.tar" should be uploaded in product "containers" as content type "docker" and should list tags successfully.

Additional Info:
Find similar issue when try to upload in Satellite 6.2.14 version.

Comment 5 Red Hat Bugzilla 2023-09-14 04:25:33 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days