Bug 1373198

Summary: [RFE]: Add possibility to test connection when creating a custom Registry
Product: Red Hat Satellite Reporter: Peter Ondrejka <pondrejk>
Component: Container ManagementAssignee: Daniel Lobato Garcia <dlobatog>
Status: CLOSED ERRATA QA Contact: Sebastian Gräßl <sgraessl>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.0CC: bbuckingham, jcallaha, sgraessl, tomckay
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/14181
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:51:07 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:

Description Peter Ondrejka 2016-09-05 13:12:43 UTC
Description of problem:

When adding a custom registry (under Containers > Registries), there's no way to check if the specified URL is live. Therefore, if there's a typo in the url, you will only find out when trying to pull an image from the repository (Containers > New container ...). 

A "test connection" button would be useful for New Registry dialog. Similar button is present when adding a compute resource.

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

satellite-6.2.2-1.1.el7sat.noarch

Comment 1 Daniel Lobato Garcia 2017-04-18 07:53:27 UTC
Connecting redmine issue http://projects.theforeman.org/issues/14181 from this bug

Comment 2 Daniel Lobato Garcia 2017-04-18 07:55:28 UTC
Peter,

This changed - Maybe it's not on 6.2 but for 6.3 at least, when the user tries to add a registry, we not only check the URL is available, but we also:

 * check the URL is actually for a containers registry
 * attempt to log in using the user credentials / check if anonymous access is allowed

I believe this fixes the bug as it introduces the check you asked for and more. It's not exactly the "test connection" button but you definitely cannot save the registry unless it's a containers registry and you have the credentials.

I've linked the commit in the upstream with this issue so it's cp-ed to 6.2.z.

Closing tentatively now - let me know if there is something else I'm missing

Comment 5 Satellite Program 2017-06-01 20:32:57 UTC
1405401

Comment 6 Sebastian Gräßl 2017-08-23 09:04:53 UTC
Verified on Satellite-6.3 Snap 12.

The registry gets checked on submitting it and presents an error in case it is not available or unable to login.

Comment 7 Satellite Program 2018-02-21 16:51:07 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/RHSA-2018:0336