Bug 1538321

Summary: Broker can't bootstrap if one of the APB's contains bad base64 data
Product: OpenShift Container Platform Reporter: Ryan Hallisey <rhallise>
Component: Service BrokerAssignee: Ryan Hallisey <rhallise>
Status: CLOSED ERRATA QA Contact: Zhang Cheng <chezhang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.9.0CC: aos-bugs, jmatthew, rhallise
Target Milestone: ---   
Target Release: 3.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-28 14:22:32 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:
Embargoed:

Description Ryan Hallisey 2018-01-24 19:53:41 UTC
Description of problem:
From https://github.com/openshift/ansible-service-broker/issues/681

The base 64 data for the downstream postgresql apb was bad. It caused the broker to continuously fail to bootstrap when using a single registry:

[2018-01-24T15:19:39.508Z] [ERROR] - Something went wrong decoding spec from label
[2018-01-24T15:19:39.508Z] [ERROR] - unable to fetch specs for registry dh - illegal base64 data at input byte 152
[2018-01-24T15:19:39.509Z] [WARNING] - registry: 0x14c4fe0 was unable to complete bootstrap - illegal base64 data at input byte 152
[2018-01-24T15:19:39.509Z] [ERROR] - Failed to bootstrap on startup!
[2018-01-24T15:19:39.509Z] [ERROR] - all registries failed on bootstrap


If there are multiple registries then the specs from the failed registry are ignored. When using a local openshift registry and a dockerhub registry I only got specs from the local openshift regsitry.

[rhallisey@rhev-i16c-04 service-broker-ci]$ oc get clusterserviceclass -o custom-columns=Name:spec.externalName,externalID:spec.externalID,Broker:spec.clusterServiceBrokerName
Name                          externalID                             Broker
localregistry-mediawiki-apb   c23ec213bb8dea1577230c5ce005b9c2       ansible-service-broker


How reproducible:
100%

Steps to Reproduce:
Create an apb with a bad base64 encoding and try to load it into the broker.

Comment 3 Zhang Cheng 2018-01-27 15:26:12 UTC
I'm changing status to "Modified" since downstream image not ready for test.
PR #682 was merged to 1.1.8, the latest in downstream registry is 1.1.7.

Comment 4 Zhang Cheng 2018-02-06 05:44:33 UTC
Changing status to ON_QA since downstream image ready for test.

Comment 5 Zhang Cheng 2018-02-06 12:25:25 UTC
@Ryan

For verify this bug, have to create a apb image with bad base64 encoding. I tried to modify Dockerfile to a bad base64 endcoding, and then via "apb build" build the image. 

But, seem "apb build" will cover the current spec base on apb.yaml. Then, how to create a image with bad base64 encoding while you reporting the bug?

Comment 6 Ryan Hallisey 2018-02-06 12:55:29 UTC
Zhang,

After you do 'apb build', modify the Dockerfile with the bad base64 data then do a `docker build`.  `apb build` is a combination of `apb prepare` and `docker build`.

Comment 10 errata-xmlrpc 2018-03-28 14:22:32 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/RHBA-2018:0489