Project

General

Profile

Bug #14181

Can't create container from external registry

Added by Daniel Lobato Garcia over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Plugin (foreman_docker)
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:

Description

Description of problem:

When creating a new container that requires a Docker image to be
pulled down into the compute resource (e.g. choosing either the
'Docker Hub' or external 'Registry' and typing the name of an image
that is not yet present in the compute resource), there's no visual
information to the end user that something is happening and you're
only redirected to the new container page once the image is pulled
down. We need to handle this scenario the same way that we handle
provisioning hosts and display progress like the orchestration
progress bar displayed during host creation.

Please refer to https://bugzilla.redhat.com/show_bug.cgi?id=1204925

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

  • Satellite-6.1.0-RHEL-7-20150324.0

How reproducible:

Steps to Reproduce:
1. Create a Docker-based compute resource
2. Create a New Container and choose the Docker Hub tab after selecting your compute resource
3. Type 'wordpress' then click the search button (magnifying glass icon) to trigger a fetch to Docker Registry
4. Select a valid Tag and complete the wizard

Actual results:

Upon finishing the wizard, the user is not taken to the new container page until the 'wordpress' image is pulled down onto the computer resource.

Expected results:

  • The user should be taken immediately to the new container page.
  • The 'Power On' button should be disabled until the docker image has been pulled and is ready.

Additional info:

Associated revisions

Revision 9ea40591 (diff)
Added by Daniel Lobato Garcia over 6 years ago

Fixes #14181 - Validate registry URL and attempt login

In order to avoid users trying to create containers in an external
registry that doesn't exist, we should provide some preventative
measures.

Revision 9ea40591 (diff)
Added by Daniel Lobato Garcia over 6 years ago

Fixes #14181 - Validate registry URL and attempt login

In order to avoid users trying to create containers in an external
registry that doesn't exist, we should provide some preventative
measures.

Revision 00ab1f9d (diff)
Added by Daniel Lobato Garcia over 6 years ago

Refs #14181 - Fix authentication validation when creating registry

On 9ea405911cef1f02ca42db77c16bea4fe297093e Docker.authenticate! was
calling /auth on the Docker host API. This kind of authentication was
not correct, as it was authenticating access to the Docker host, not to
the registry.

Instead, we just perform a restclient call with basic authentication
against an endpoint as per https://docs.docker.com/v1.7/reference/api/hub_registry_spec/#authentication-and-authorization

We should support token authentication as well after this and add a
new field to the form.

Revision 00ab1f9d (diff)
Added by Daniel Lobato Garcia over 6 years ago

Refs #14181 - Fix authentication validation when creating registry

On 9ea405911cef1f02ca42db77c16bea4fe297093e Docker.authenticate! was
calling /auth on the Docker host API. This kind of authentication was
not correct, as it was authenticating access to the Docker host, not to
the registry.

Instead, we just perform a restclient call with basic authentication
against an endpoint as per https://docs.docker.com/v1.7/reference/api/hub_registry_spec/#authentication-and-authorization

We should support token authentication as well after this and add a
new field to the form.

History

#1 Updated by Daniel Lobato Garcia over 6 years ago

The error here was that the registry was specified as:

registry.access.redhat.com

vs:

http://registry.access.redhat.com

the protocol is required.

We should validate the field input to verify that it is a URL

#2 Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-docker/pull/142 added

#3 Updated by Daniel Lobato Garcia over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by The Foreman Bot over 6 years ago

  • Pull request https://github.com/theforeman/foreman-docker/pull/148 added

#5 Updated by Daniel Lobato Garcia over 6 years ago

  • Subject changed from Display progress information when pulling Docker images onto a Compute Resource to Can't create container from external registry
  • Bugzilla link changed from 1206300 to 1230710

#6 Updated by Daniel Lobato Garcia over 5 years ago

  • Bugzilla link changed from 1230710 to 1373198

Also available in: Atom PDF