Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1613720

Summary: [apb-tools] apb broker catalog/bootstrap failed to find route for broker
Product: OpenShift Container Platform Reporter: Zihan Tang <zitang>
Component: Service BrokerAssignee: Dylan Murray <dymurray>
Status: CLOSED ERRATA QA Contact: Zihan Tang <zitang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.11.0CC: aos-bugs, chezhang, dymurray, jmontleo
Target Milestone: ---   
Target Release: 3.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-11 07:24:08 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 Zihan Tang 2018-08-08 08:20:51 UTC
Description of problem:
apb broker catalog -n ansible-service-broker
apb broker bootstrap -n ansible-service-broker

the two comand faile to find route for broker

Version-Release number of selected component (if applicable):
apb:1.9.0
asb: 1.3.7
How reproducible:
always

Steps to Reproduce:
1. oc login as cluster-admin user
2. run command:
# apb broker bootstrap -n ansible-service-broker
# apb broker catalog -n ansible-service-broker

Actual results:
2. failed with error: 
ERRO Failed to get broker route: Failed to find route for broker: ansible-service-broker 

Expected results:
bootstrap and catalog subcommand succeed.

Additional info:
asb route : 
# oc get route
NAME       HOST/PORT                                                                PATH      SERVICES   PORT      TERMINATION   WILDCARD
asb-1338   asb-1338-openshift-ansible-service-broker.apps.0808-etf.qe.rhcloud.com             asb        1338      reencrypt     None

# apb broker catalog/bootstrap -n openshift-ansible-service-broker 
also failed with the same error

Comment 3 Zihan Tang 2018-08-21 09:09:29 UTC
PR merged in 1.9.2, I tried apb-1.9.2, 
' apb broker bootstrap' and 'apb broker catalog' could work.
but they failed when add -n parameters.

  -n, --name string     Name of Automation Broker instance

#  apb broker bootstrap -n ansible-service-broker
ERRO Failed to get broker route: Failed to find route with name [ansible-service-broker] in namespace [ansible-service-broker] 

# apb broker catalog -n ansible-service-broker
ERRO Failed to get broker route: Failed to find route with name [ansible-service-broker] in namespace [ansible-service-broker]

Comment 4 Jason Montleon 2018-08-21 12:44:17 UTC
The defaults from the defaults.json appear to work:
# cat ~/.apb/defaults.json 
{
  "defaults": {
    "BrokerNamespace": "openshift-ansible-service-broker",
    "BrokerResourceURL": "/apis/servicecatalog.k8s.io/v1beta1/clusterservicebrokers/",
    "BrokerRouteName": "asb",
    "ClusterServiceBrokerName": "ansible-service-broker"
  }


apb broker bootstrap 
Bootstrapping the broker at [https://asb-1338-openshift-ansible-service-broker.apps.192.168.121.4.nip.io/osb/v2/bootstrap].
Successfully started bootstrap job for broker [asb]

But it looks like -n is having an impact on both the route and namespace:
apb broker bootstrap -n ansible-service-broker
ERRO Failed to get broker route: Failed to find route with name [ansible-service-broker] in namespace [ansible-service-broker] 

I'm guessing ansible-service-broker was chosen because "Name of Automation Broker instance" might imply the ClusterServiceBrokerName from "oc get clusterservicebroker".

Comment 5 Dylan Murray 2018-08-21 17:59:30 UTC
https://github.com/automationbroker/apb/pull/119

Comment 6 Dylan Murray 2018-08-22 14:48:05 UTC
New builds added to advisory:
openshift-enterprise-asb-container-v3.11.0-0.20.0.0
openshift-enterprise-apb-tools-container-v3.11.0-0.20.0.0

Comment 7 Zihan Tang 2018-08-28 07:56:46 UTC
Verified.

But the BrokerRouteName can not be changed by option, even though we change other namespace , it will still to find route for asb. 
Will it support namespaced broker in v3.11? if not , I think it is acceptable to only for asb.

Comment 8 Dylan Murray 2018-09-10 19:06:18 UTC
Zihan,

I don't understand the question. BrokerRouteName can be changed with `apb config`. We submitted a PR which defaults the route name to `asb-1338` to resolve a bug that this was causing. That might be what you're referring to.

This tool does support namespaced brokers.

Comment 9 Zihan Tang 2018-09-11 03:33:09 UTC
Sorry that I didn't remove the 'needinfo' for older apb-tools, I have checked the latest apb-1.9.6 support namespaced service broker , and BrokerRouteName can be changed with `apb config`.
Thanks

Comment 11 errata-xmlrpc 2018-10-11 07:24:08 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:2652