Description of problem: Incorrect error message on docker repository creation Version-Release number of selected component (if applicable): Version: Satellite-6.1.0-RHEL-7-20150205.0 How reproducible: Always Steps to Reproduce: hammer> repository create --name='dockerrepo4' --content-type='docker' --url='https://registry.hub.docker.com' --product='testproduct3' --organization-id=1 Could not create the repository: Validation failed: Repository URL and Upstream Name cannot be empty. Both are required for syncing from the upstream. Actual results: As shown above Expected results: Could not create the repository: Validation failed: Upstream Name cannot be empty. Additional info:
This is the intended behavior I believe. To create a docker repo you must supply either both the upstream name and url: h repository create --name='dockerrepo4' --content-type='docker' --url='https://registry.hub.docker.com' --product='testproduct3' --organization-id=1 --docker-upstream-name=centos Or neither: h repository create --name='dockerrepo4' --content-type='docker' -product='testproduct3' --organization-id=1
I expected a more smarter error message for usability: Current error message for the scenario I mentioned in the bug is: "Could not create the repository: Validation failed: Repository URL and Upstream Name cannot be empty. Both are required for syncing from the upstream." Note that I already provided Repository URL. So I expected error message to be something like: "Could not create the repository: Validation failed: Upstream Name cannot be empty when Repository URL is provided. Both are required for syncing from the upstream."
Talked with sthirugn. The latest compose should say this: "Validation failed: Docker upstream name cannot be blank. Either provide all or no sync information. Repository URL or Upstream Name is empty. Both are required for syncing from the upstream."
FYI, it was added here: https://github.com/Katello/katello/pull/4978/files#diff-7bfb4ceeca67af50fe464d5451281e40R497
Verified. Version Tested: Satellite-6.1.0-RHEL-6-20150217.0 hammer> repository create --name='dockerrepo1' --content-type='docker' --product='testproduct1' --organization-id=1 --docker-upstream-name='fedora/ssh' Could not create the repository: Validation failed: Url cannot be blank. Either provide all or no sync information., Repository URL or Upstream Name is empty. Both are required for syncing from the upstream. hammer> repository create --name='dockerrepo4' --content-type='docker' --url='https://registry.hub.docker.com' --product='testproduct1' --organization-id=1 Could not create the repository: Validation failed: Docker upstream name cannot be blank. Either provide all or no sync information., Repository URL or Upstream Name is empty. Both are required for syncing from the upstream.
This bug is slated to be released with Satellite 6.1.
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-2015:1592