Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1613720 - [apb-tools] apb broker catalog/bootstrap failed to find route for broker
[apb-tools] apb broker catalog/bootstrap failed to find route for broker
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker (Show other bugs)
3.11.0
Unspecified Unspecified
medium Severity medium
: ---
: 3.11.0
Assigned To: Dylan Murray
Zihan Tang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-08 04:20 EDT by Zihan Tang
Modified: 2018-10-11 03:24 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-10-11 03:24:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 None None None 2018-10-11 03:24 EDT

  None (edit)
Description Zihan Tang 2018-08-08 04:20:51 EDT
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 05:09:29 EDT
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 08:44:17 EDT
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 13:59:30 EDT
https://github.com/automationbroker/apb/pull/119
Comment 6 Dylan Murray 2018-08-22 10:48:05 EDT
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 03:56:46 EDT
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 15:06:18 EDT
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-10 23:33:09 EDT
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 03:24:08 EDT
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

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