Description of problem: Now that the service broker no longer uses the image from the apb.yml (https://bugzilla.redhat.com/show_bug.cgi?id=1497819), there is a problem when an APB developer attempts to push their APB to the broker. When the APB tool is used to push a spec to the broker, for development purposes, a docker image path for that APB is not stored. How reproducible: Always Steps to Reproduce: 1. Launch an origin cluster with ansible service broker 2. Use APB tool to push an APB to the broker 3. Examine the broker's logs (ie. oc logs ${asb_pod_name} -c asb) Actual results: [2017-10-05T14:22:55.126Z] [DEBUG] handler::apbAddSpec ... [2017-10-05T14:22:55.127Z] [DEBUG] Unmarshalled into apb.Spec: [2017-10-05T14:22:55.127Z] [DEBUG] {ID: Version:1.0 FQName:hello-world-apb Image: Tags:[] Bindable:false Description:deploys hello-world web application Metadata:map[displayName:Hello World (APB) longDescription:A sample APB which deploys a containerized Hello World web application dependencies:[docker.io/ansibleplaybookbundle/hello-world:latest] providerDisplayName:Red Hat, Inc.] Async:optional Plans:[{Name:default Description:A sample APB which deploys Hello World Metadata:map[displayName:Default longDescription:This plan deploys a Python web application displaying Hello World cost:$0.00] Free:true Bindable:false Parameters:[]}]} Expected results: [2017-10-05T15:23:16.817Z] [DEBUG] handler::apbAddSpec ... [2017-10-05T15:23:16.817Z] [DEBUG] Unmarshalled into apb.Spec: [2017-10-05T15:23:16.818Z] [DEBUG] {ID: Version:1.0 FQName:hello-world-apb Image:hello-world-apb Tags:[] Bindable:false Description:deploys hello-world web application Metadata:map[displayName:Hello World (APB) longDescription:A sample APB which deploys a containerized Hello World web application dependencies:[docker.io/ansibleplaybookbundle/hello-world:latest] providerDisplayName:Red Hat, Inc.] Async:optional Plans:[{Name:default Description:A sample APB which deploys Hello World Metadata:map[displayName:Default longDescription:This plan deploys a Python web application displaying Hello World cost:$0.00] Free:true Bindable:false Parameters:[]}]} Additional info: N/A
https://github.com/openshift/ansible-service-broker/pull/476
I don't believe that you have the latest image. ``` $ docker pull brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/ose-ansible-service-broker:latest Trying to pull repository brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/ose-ansible-service-broker ... sha256:ceaee283127193c8632afa8f1a2300bfb52ef5a6e789d2b42ab96be235534323: Pulling from brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/ose-ansible-service-broker 243dc7b9e786: Already exists 550516fb1c76: Already exists 8c8c2f3ebd31: Pull complete Digest: sha256:ceaee283127193c8632afa8f1a2300bfb52ef5a6e789d2b42ab96be235534323 Status: Downloaded newer image for brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/ose-ansible-service-broker:latest $ docker inspect brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/ose-ansible-service-broker:latest # Snipped "Labels": { "architecture": "x86_64", "authoritative-source-url": "registry.access.redhat.com", "build-date": "2017-10-27T07:02:30.460085", "com.redhat.build-host": "ip-10-29-120-75.ec2.internal", "com.redhat.component": "openshift-enterprise-asb-docker", "distribution-scope": "public", "io.k8s.display-name": "Red Hat Enterprise Linux 7", "io.openshift.tags": "base rhel7", "name": "openshift3/ose-ansible-service-broker", "release": "0.183.0.0", "summary": "Provides the latest release of Red Hat Enterprise Linux 7 in a fully featured and supported base image.", "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/openshift3/ose-ansible-service-broker/images/v3.7.0-0.183.0.0", "vcs-ref": "db6c3507ac0d66165e8d2c02240092b90d3f5288", "vcs-type": "git", "vendor": "Red Hat, Inc.", "version": "v3.7.0" } ``` However, this shouldn't matter as the image you specified also has the fix. ``` $ docker run -it --entrypoint /bin/bash brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/ose-ansible-service-broker:v3.7.0-0.178.1.0 bash-4.2$ rpm -q --changelog $(rpm -qa ansible-service-broker) | grep '1498954' - Bug 1498954 - Broker in developer mode must support apb push (#476) (david.j.zager) ``` Still looking into this...
Good news: this is expected behavior Bad news: I messed up in the description What happened is that I wrote the expected behavior based on my initial set of changes in https://github.com/openshift/ansible-service-broker/pull/476, however changes were requested that resulted in the current scenario. Put simply, we unmarshall the APB spec **then** make the image = apb name **then** store in etcd. You should look at etcd for the image field to be filled in. From the broker logs: ``` [2017-10-27T18:33:59.855Z] [DEBUG] Unmarshalled into apb.Spec: [2017-10-27T18:33:59.855Z] [DEBUG] {ID: Version:1.0 FQName:fail-apb Image: Tags:[] Bindable:false Description:This is an APB built to fail on provision or deprovision Metadata:map[displayName:Fail (APB)] Async:optional Plans:[{ID: Name:failprovision Description:This plan fails on provision Metadata:map[] Free:true Bindable:false Parameters:[] BindParameters:[] UpdatesTo:[]} {ID: Name:faildeprovision Description:This plan fails on deprovision Metadata:map[] Free:true Bindable:false Parameters:[] BindParameters:[] UpdatesTo:[]}]} ``` But the image is properly stored in etcd as the apb's name: ``` $ curl -L 172.17.0.6:2379/v2/keys/spec | python -m json.tool | grep 'push' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 36092 0 36092 0 0 16.4M 0 --:--:-- --:--:-- --:--:-- 34.4M "value": "{\"id\":\"97cf1893d97f32dd339d1f7cba6b31bf\",\"version\":\"1.0\",\"name\":\"apb-push-fail-apb\",\"image\":\"fail-apb\",\"tags\":null,\"bindable\":false,\"description\":\"This is an APB built to fail on provision or deprovision\",\"metadata\":{\"displayName\":\"Fail (APB)\"},\"async\":\"optional\",\"plans\":[{\"id\":\"3b80412f3152985496b8ea7f77476c2c\",\"name\":\"failprovision\",\"description\":\"This plan fails on provision\",\"free\":true,\"parameters\":null},{\"id\":\"b8426ab0d74addc6154694055a448e19\",\"name\":\"faildeprovision\",\"description\":\"This plan fails on deprovision\",\"free\":true,\"parameters\":null}]}" ```
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