Bug 1496572 - ASB: Misleading error message when dockerhub credentials are incorrect: V1 Schema Manifest does not exist in registry
Summary: ASB: Misleading error message when dockerhub credentials are incorrect: V1 ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 3.7.0
Assignee: Shawn Hurley
QA Contact: Zhang Cheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-27 19:37 UTC by John Matthews
Modified: 2017-11-28 22:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-28 22:13:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description John Matthews 2017-09-27 19:37:13 UTC
Description of problem:

The ansible service broker is not providing a useful error message when invalid credentials are entered for dockerhub.

For example, I mistakenly entered the email address associated with my dockherub account instead of the 'username'.   The resulting error was confusing to debug.

Error was: 
[2017-09-27T18:09:44.315Z] [ERROR] V1 Schema Manifest does not exist in registry
[2017-09-27T18:09:44.348Z] [DEBUG] Registry::imageToSpec

Desire is to test/detect if credentials are valid and if not clearly tell user.



Steps to Reproduce:
1.  Configured an adapter to pull from dockerhub, ansibleplaybookbundle org
2.  Configure credentials to use an email address, and/or invalid username
3.  Bootstrap broker, observe logs and see errors

Actual results:
[2017-09-27T18:09:42.101Z] [DEBUG] BundleSpecLabel: com.redhat.apb.spec
[2017-09-27T18:09:42.101Z] [DEBUG] Loading image list for org: [ ansibleplaybookbundle ]
[2017-09-27T18:09:43.752Z] [DEBUG] Trying to load ansibleplaybookbundle/s2i-apb
[2017-09-27T18:09:43.752Z] [DEBUG] Trying to load ansibleplaybookbundle/mediawiki123-apb
[2017-09-27T18:09:43.752Z] [DEBUG] Trying to load ansibleplaybookbundle/rhscl-postgresql-apb
[2017-09-27T18:09:43.752Z] [DEBUG] Trying to load ansibleplaybookbundle/hello-world-apb
[2017-09-27T18:09:43.752Z] [DEBUG] Trying to load ansibleplaybookbundle/hello-world-db-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/jenkins-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/pyzip-demo-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/etherpad-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/hastebin-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/rhscl-mariadb-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/pyzip-demo-db-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/nginx-oss-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/wordpress-ha-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/rhscl-mysql-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/thelounge-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/rds-postgres-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/rocketchat-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/manageiq-apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/origin-ansible-service-broker
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/ansible-service-broker
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/apb-base
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/hello-world
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/mediawiki123
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/py-zip-demo
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/apb
[2017-09-27T18:09:43.753Z] [DEBUG] Trying to load ansibleplaybookbundle/apb-assets-base
[2017-09-27T18:09:43.754Z] [DEBUG] Filter applied against registry: dh
[2017-09-27T18:09:43.754Z] [DEBUG] APBs passing white/blacklist filter:
[2017-09-27T18:09:43.754Z] [DEBUG] -> ansibleplaybookbundle/etherpad-apb
[2017-09-27T18:09:43.754Z] [DEBUG] -> ansibleplaybookbundle/pyzip-demo-apb
[2017-09-27T18:09:43.754Z] [DEBUG] -> ansibleplaybookbundle/rhscl-mysql-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/rds-postgres-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/rocketchat-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/s2i-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/mediawiki123-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/hello-world-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/wordpress-ha-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/pyzip-demo-db-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/manageiq-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/hello-world-db-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/rhscl-postgresql-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/nginx-oss-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/rhscl-mariadb-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/thelounge-apb
[2017-09-27T18:09:43.755Z] [DEBUG] -> ansibleplaybookbundle/jenkins-apb
[2017-09-27T18:09:43.756Z] [DEBUG] -> ansibleplaybookbundle/hastebin-apb
[2017-09-27T18:09:44.011Z] [DEBUG] Registry::imageToSpec
[2017-09-27T18:09:44.315Z] [ERROR] V1 Schema Manifest does not exist in registry
[2017-09-27T18:09:44.348Z] [DEBUG] Registry::imageToSpec
[2017-09-27T18:09:44.392Z] [ERROR] V1 Schema Manifest does not exist in registry
[2017-09-27T18:09:44.441Z] [DEBUG] Registry::imageToSpec
[2017-09-27T18:09:44.483Z] [ERROR] V1 Schema Manifest does not exist in registry
[2017-09-27T18:09:44.515Z] [DEBUG] Registry::imageToSpec
[2017-09-27T18:09:44.551Z] [ERROR] V1 Schema Manifest does not exist in registry

Expected results:

Message about invalid credentials, opposed to:
   V1 Schema Manifest does not exist in registry


Additional info:
Below is a sample of a ConfigMap I used with the broker when testing.

registry:
  - type: "dockerhub"
    name: "dh"
    url: "docker.io"
    user: "myname"
    pass: "somepasswordvalue"
    org: "ansibleplaybookbundle"
    tag: "latest"
    white_list:
      - ".*-apb$"
dao:
  etcd_host: 0.0.0.0
  etcd_port: 2379
log:
  logfile: /var/log/ansible-service-broker/asb.log
  stdout: true
  level: debug
  color: true
openshift:
  host: ""
  ca_file: ""
  bearer_token_file: ""
  image_pull_policy: "IfNotPresent"
  sandbox_role: "edit"
broker:
  dev_broker: True
  bootstrap_on_startup: true
  refresh_interval: "600s"
  launch_apb_on_bind: False
  output_request: False
  recovery: True
  ssl_cert_key: /etc/tls/private/tls.key
  ssl_cert: /etc/tls/private/tls.crt
  auth:
    - type: basic
      enabled: True

Comment 1 Shawn Hurley 2017-10-13 13:47:00 UTC
Bug fixed with PR: https://github.com/openshift/ansible-service-broker/pull/490

Comment 3 Zhang Cheng 2017-10-17 09:21:36 UTC
Verified and LGTM.

Actually test result:
[2017-10-17T09:18:21.186Z] [DEBUG] Registry::imageToSpec
[2017-10-17T09:18:21.323Z] [ERROR] Unable to authenticate to the registry, registry credentials could be invalid.

Comment 7 errata-xmlrpc 2017-11-28 22:13:02 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-2017:3188


Note You need to log in before you can comment on or make changes to this bug.