Description of problem: asb is unable to retrieve image names for stage registry Version-Release number of selected component (if applicable): asb : 1.2.7 How reproducible: always Steps to Reproduce: 1.set broker-config, using stage registry registry: - type: rhcc name: rh url: registry.access.stage.redhat.com org: tag: v3.10 white_list: [.*-apb$] 2. check asb logs and apb bundles Actual results: asb can not retrieve image names for stage registry asb log: time="2018-04-27T03:15:08Z" level=error msg="unable to retrieve image names for registry rh - json: cannot unmarshal string into Go struct field RHCCImage.is_official of type bool" [2018-04-27T03:15:08.817Z] [WARNING] - registry: 0x157f290 was unable to complete bootstrap - json: cannot unmarshal string into Go struct field RHCCImage.is_official of type bool [root@host-172-16-120-175 ~]# oc get bundles No resources found. Expected results: retrieve image names and spec successfully. Additional info: asb can retrieve images from dockerhub and access registry.
Stage request output: * Notice the "is_official" and "is_trusted" types {"num_results": 7, "query": "\"*-apb\"", "results": [{"description": null, "is_official": "false", "is_trusted": "false", "name": "MySQL APB", "should_filter": false, "star_count": 0}, {"description": null, "is_official": "false", "is_trusted": "false", "name": "MariaDB APB", "should_filter": false, "star_count": 0}, {"description": null, "is_official": "false", "is_trusted": "false", "name": "MediaWiki APB", "should_filter": false, "star_count": 0}, {"description": null, "is_official": "false", "is_trusted": "false", "name": "Ansible Playbook Bundle Base", "should_filter": false, "star_count": 0}, {"description": null, "is_official": "false", "is_trusted": "false", "name": "PostgreSQL APB", "should_filter": false, "star_count": 0}, {"description": null, "is_official": "false", "is_trusted": "false", "name": "Ansible Playbook Bundle (APB) Tools", "should_filter": false, "star_count": 0}, {"description": null, "is_official": "false", "is_trusted": "false", "name": "Ansible Service Broker", "should_filter": false, "star_count": 0}]} Production request output: * Notice the "is_official" and "is_trusted" types {"num_results": 6, "query": "\"*-apb\"", "results": [{"description": "Ansible Playbook Bundle (APB) tools to assist in the building and packaging of APBs.", "is_official": false, "is_trusted": false, "name": "openshift3/apb-tools", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundle application definition for MySQL.MySQL is a multi-user, multi-threaded SQL database server.", "is_official": false, "is_trusted": false, "name": "openshift3/mysql-apb", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundles Base Image, contains an Ansible runtime along with Kubernetes and OpenShift modules", "is_official": false, "is_trusted": false, "name": "openshift3/apb-base", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundle application definition for MariaDB.MariaDB is a multi-user, multi-threaded SQL database server.", "is_official": false, "is_trusted": false, "name": "openshift3/mariadb-apb", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundle application definition for PostgreSQL. PostgreSQL is an advanced Object-Relational database management system (DBMS)", "is_official": false, "is_trusted": false, "name": "openshift3/postgresql-apb", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundle application definition for MediaWiki. MediaWiki is a free software open source wiki package written in PHP, originally for use on Wikipedia. It is now also used by several other projects of the non-profit Wikimedia Foundation and by many other wikis", "is_official": false, "is_trusted": false, "name": "openshift3/mediawiki-apb", "should_filter": true, "star_count": 0}]}
The underlying problem looks to be that the stage and production environment have different behavior. The fix needed is to update the stage environment so it has the same behavior.
There was a change intended for validation in QA that was accidentally merged into stage as well. This was reverted Friday and the stage registry should now return the expected types for those fields.
John & Patrick, the stage registry is still not reachable . in asb 1.2.7 , still report the log: time="2018-05-02T03:13:59Z" level=error msg="unable to retrieve image names for registry rh - 500 INTERNAL SERVER ERROR" [2018-05-02T03:13:59.862Z] [WARNING] - registry: 0x157f290 was unable to complete bootstrap - 500 INTERNAL SERVER ERROR
Putting this back ON_QA, to ask for re-test. I tried the stage registry today and looks OK now. $ curl -i -k -H "Accept: application/json" "https://registry.access.stage.redhat.com/v1/search?q=apb" HTTP/1.1 200 OK Date: Wed, 02 May 2018 16:55:09 GMT Server: Apache Content-Length: 1712 X-Docker-Registry-Version: 0.6.6 X-Docker-Registry-Config: common Connection: close Content-Type: application/json {"num_results": 6, "query": "apb", "results": [{"description": "Ansible Playbook Bundle (APB) tools to assist in the building and packaging of APBs.", "is_official": false, "is_trusted": false, "name": "openshift3/apb-tools", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundle application definition for MariaDB.MariaDB is a multi-user, multi-threaded SQL database server.", "is_official": false, "is_trusted": false, "name": "openshift3/mariadb-apb", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundle application definition for MySQL.MySQL is a multi-user, multi-threaded SQL database server.", "is_official": false, "is_trusted": false, "name": "openshift3/mysql-apb", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundles Base Image, contains an Ansible runtime along with Kubernetes and OpenShift modules", "is_official": false, "is_trusted": false, "name": "openshift3/apb-base", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundle application definition for PostgreSQL. PostgreSQL is an advanced Object-Relational database management system (DBMS)", "is_official": false, "is_trusted": false, "name": "openshift3/postgresql-apb", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundle application definition for MediaWiki. MediaWiki is a free software open source wiki package written in PHP, originally for use on Wikipedia. It is now also used by several other projects of the non-profit Wikimedia Foundation and by many other wikis", "is_official": false, "is_trusted": false, "name": "openshift3/mediawiki-apb", "should_filter": true, "star_count": 0}]}
At present , stage service is unavailable. [root@host-172-16-120-48 ~]# curl -i -k -H "Accept: application/json" "https://registry.access.stage.redhat.com/v1/search?q=apb" HTTP/1.1 503 SERVICE UNAVAILABLE Date: Thu, 03 May 2018 02:57:04 GMT Server: Apache Content-Length: 19 X-Docker-Registry-Version: 0.6.6 X-Docker-Registry-Config: common Connection: close Content-Type: text/html; charset=utf-8 Service Unavailable And pull image failed: docker pull registry.access.stage.redhat.com/openshift3/mariadb-apb:v3.9 Trying to pull repository registry.access.stage.redhat.com/openshift3/mariadb-apb ... error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p>The requested URL /content/dist/rhel/server/7/7Server/multiarch/ose/3/containers/registry/openshift3/mariadb-apb/manifests/list/v3.9 was not found on this server.</p>\n<hr>\n<address>Apache Server at cdn.stage.redhat.com Port 80</address>\n</body></html>\n"
Now it is available. marked it as verified. [root@dhcp-140-42 ~]# curl -i -k -H "Accept: application/json" "https://registry.access.stage.redhat.com/v1/search?q=apb" HTTP/1.1 200 OK Date: Thu, 03 May 2018 09:48:19 GMT Server: Apache Content-Length: 1712 X-Docker-Registry-Version: 0.6.6 X-Docker-Registry-Config: common Connection: close Content-Type: application/json {"num_results": 6, "query": "apb", "results": [{"description": "Ansible Playbook Bundle (APB) tools to assist in the building and packaging of APBs.", "is_official": false, "is_trusted": false, "name": "openshift3/apb-tools", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundle application definition for MariaDB.MariaDB is a multi-user, multi-threaded SQL database server.", "is_official": false, "is_trusted": false, "name": "openshift3/mariadb-apb", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundle application definition for MySQL.MySQL is a multi-user, multi-threaded SQL database server.", "is_official": false, "is_trusted": false, "name": "openshift3/mysql-apb", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundles Base Image, contains an Ansible runtime along with Kubernetes and OpenShift modules", "is_official": false, "is_trusted": false, "name": "openshift3/apb-base", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundle application definition for PostgreSQL. PostgreSQL is an advanced Object-Relational database management system (DBMS)", "is_official": false, "is_trusted": false, "name": "openshift3/postgresql-apb", "should_filter": true, "star_count": 0}, {"description": "Ansible Playbook Bundle application definition for MediaWiki. MediaWiki is a free software open source wiki package written in PHP, originally for use on Wikipedia. It is now also used by several other projects of the non-profit Wikimedia Foundation and by many other wikis", "is_official": false, "is_trusted": false, "name": "openshift3/mediawiki-apb", "should_filter": true, "star_count": 0}]}